How many objects are created in the following code?
String a, b, c;
a = "1234";
b = a;
c = a + b;
I was been told the answer is 2, because only a and b point to their own data.
c is only created from using a and b. However, isn't the act of declaring a variable considered creating it? Is this question vague? I said 3.
String a;, where's the object? What if I doString a = null;?