List of article on Archieve

Boolean Class in JAVA with Example

Boolean Class is a wrapper class that wraps the primitive type boolean. This class provides mechanism to convert primitive type “boolean” to object type “Boolean” or vice versa. Object of Class Boolean can contain only single value whose type is boolean. This class extends Object class and implements Serializable and Comparable interfaces. Boolean Class Constructors  … Continue reading Boolean Class in JAVA with Example

Difference Between String And StringBuffer in JAVA With Example

 Difference between String Class and String buffer class String class is Immutable whereas String Buffer class is Mutable. String class consumes more memory whenever we append too many strings, whereas String buffer consumes very less memory. String class performance is low as compared to string Buffer class when we concatenate too many strings, as proven … Continue reading Difference Between String And StringBuffer in JAVA With Example

String Tokenizer in JAVA with example

String Tokenizer class is for breaking a string into tokens. This class is basically a legacy class although it is used only because of its compatible reasons, but its use is discouraged in new code, as its methods does not able to distinguish between identifiers, numbers and strings that are quoted. Moreover this class method … Continue reading String Tokenizer in JAVA with example

Life Cycle of a Thread In JAVA

In Multithreading, Thread can be in one of the five states which forms life cycle of the Thread. This life cycle of a thread is controlled by java virtual machine (JVM). Following are the five stages by which Thread goes through in its lifecycle as shown in figure 1.1 : New Runnable Running Non-Runnable (Blocked) … Continue reading Life Cycle of a Thread In JAVA