How many objects are created when we create String class
object using new operator?
Answer Posted / mahesh
yes two objects will be created when you use new operator
for a String. The reason for this is at first it creates an
object in HEAP and then verifies in the String Constant
Pooling if it is not available then creates the new one in
pool. so totally two object will be created.
| Is This Answer Correct ? | 22 Yes | 5 No |
Post New Answer View All Answers
What are the various access specifiers for java classes?
Define immutable object?
Can we write class inside a class in java?
Explain notify() method of object class ?
what is comparable and comparator interface?
what is session in java?
What is difference between array and arraylist in java?
What is identifier in java?
What are the principle concepts of oops?
Is treeset sorted in java?
How can we avoid including a header more than once?
What is the java virtual machine?
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
What is the default value of an object reference declared as an instance variable?
What is a generic code?