Recent Posts

Order of execution of java members

members of a class 1. properties(static and instance) 2. methods (static and instance) 3. constructors. 4. blocks. (static and instance) //first variable and property. order: 1. static properties are initialized. 2. static blocks are executed. 3. static methods are executed only when we call them. we can use static methods …

Read More »

Object Creation in Java

1)How many ways are there to create an object? 1. How many ways to create Java objects A. a. new operator. b. newinstance(). c. clonning. d. serialization / deserialization A. newinstance() method is available in the class called Class.to create the object for Class we have multiple ways. a. [ClassName].class …

Read More »

What is Mutable and Immutable ?

1.what is the Difference between String and StringBuffer? Ans: 1. The string is immutable whereas string buffer is mutable. 2. The string is asynchronous.string buffer is Synchronized. 3. Both are thread safe. 2.what is mutable and immutable ? even though string immutable it looks like mutable? Ans: • Mutable means …

Read More »