How many objects are created in the following code?
String a, b, c;
a = "1234";
b = a;
c = a + b;
I was told that the answer 2is because only a and b indicate their own data.
ccreated only when using aand b. However, is not declaring a variable declaration a variable creation ? Is this a vague question? I said 3.
source
share