0

Reference Type

so if String is Reference Type shouldn't it print TestTwo instead of Test? public class MyClass { public static void main(String[] args) { String one = "Test"; method(one); System.out.println(one); } public static void method(String a){ a = "TestTwo"; } }

12th Jul 2017, 9:57 AM
Giorgi Gogelashvili
Giorgi Gogelashvili - avatar
0 Answers