I'm learning about Java and String and I want to ask you how many objects are created by JVM in this specific case:
String str = new String("USA");
Does JVM create one object in heap or 2 objects, one in heap and the other in String pooled area?
Thank you!