public class NewClass {
public String makinStrings() {
String s = "Fred";
s = s + "47";
s = s.substring(2, 5);
s = s.toUpperCase();
return s.toString();
}
}
How many objects are created in the above program? I see as 4 objects after converting to uppercase string, but the answer is 3 according scjp book. I don't understand how come only 3 objects