class MyClass{
public void method(){
String s = new String("a");
}
}
- s goes to JVM Stack
- new String("a") goes to Heap
- "a" goes to SCP. Which is in Metaspace.
Is that correct?
class MyClass{
public void method(){
String s = new String("a");
}
}
Is that correct?