+ 1

String A= new String ( “Java”);

What does it mean

23rd Apr 2020, 12:46 PM
Zhengrong Yan
Zhengrong Yan - avatar
1 Resposta
+ 2
It creates two objects (in String pool and in heap) and one reference variable where the variable 'A' will refer to the object in the heap heap is a memory location in ram usually allocated for dynamically assigned variables.
23rd Apr 2020, 1:01 PM
Prabhat Ranjan
Prabhat Ranjan - avatar