is there any thing called static pool in jvm | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

is there any thing called static pool in jvm

I think the static variables will be stored here

4th Nov 2016, 8:30 PM
Joee RĆÆnold
Joee RĆÆnold - avatar
1 Resposta
+ 3
If you Create any String objects then it always Stored in STRING POOL CONSTANT.. String Pool constant is Inside Heap AREA....If u r Using String Literal to Create String then It It will store in SPC and if already exists the refer to same Memory ex. String s1="Hello"; String s2="Hello"; in this case S1 and S2 will focus to same Memory.. If u r Using NEW keyword to create String object then it will directly save to HEAP MEMORY EX String s1=new String "Hello"; String s2=new String "Hello"; S1 and s2 will stores Individual memory for Hello in heap Area Directly..
6th Nov 2016, 7:00 PM
Mukesh Kumaar
Mukesh Kumaar - avatar