How many objects will be created in the following code?
Page 1 of 1
How many objects will be created in the following code?
String s = new String("Welcome");
Two objects, one in string constant pool and other in non-pool(heap).
Similar topics
» How many objects will be created in the following code?
» Can an unrefrenced objects be refrenced again?
» Why string objects are immutable in java?
» Can an unrefrenced objects be refrenced again?
» Why string objects are immutable in java?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|