Thursday, September 29, 2011

How to avoid multiple lines in TD tag?

Posted by on Thursday, September 29, 2011
In some situation (viewing in different browsers) the single <td> tag displays content in two lines. If you want to display sentence in single line always in all browsers then use <td> attributes ‘nowrap’

For example,you may want username/userid/Name to be displayed in single line, but due to some reason or different browser it will display in two lines like below,
/Name .

Sunday, September 25, 2011

HeapSort ( array Based) implementation in Java

Posted by on Sunday, September 25, 2011
There are two types of heaps. First one is Max heap and second one is Min heap. Heap (Max/Min) is a special type of binary tree.The roots of  the max heap is greater than its child roots. Other heap is Min heap it is also a special type of heap which has minimum root than his child. We can sort the array values using heap sorting algorithm. In this algorithm the heap build is used to rebuild the heap.

Saturday, September 17, 2011

Binary Search Tree : Basics

Posted by on Saturday, September 17, 2011
A Binary Tree is a tree data structre in which each node has atmost two child nodes, usually called as 'left' and  'right' child respectively. 
Binary Tree

Monday, September 12, 2011

OOPs Concept: Encapsulation

Posted by on Monday, September 12, 2011
Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction. RFAZHE7YNFV8

Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods. If a field is declared private, it cannot be accessed by anyone outside the class, thereby hiding the fields within the class. For this reason, encapsulation is also referred to as data hiding.

Thursday, September 8, 2011

Java Modifiers Summary

Posted by on Thursday, September 8, 2011
The Modifier class provides static methods and constants to decode class and member access modifiers. The sets of modifiers are represented as integers with distinct bit positions representing different modifiers.

Thursday, September 1, 2011

SortableStack implementation in Java

Posted by on Thursday, September 1, 2011
I am implementing an interface for Stack which will help to push and pop in O(n) time and help in finding the highest, lowest and the middle element in O(1) time.

I will be using Arraylist (since I m using a standard jdk 6 and not some other package) because with using this we can implement the above interface in the least possible time.
© 2010 Code 2 Learn