0
how to execute the below java logic
class Test2 { public static void main(String[] args) { new Test2().method("1st"); new Test2().method("1st","2nd"); } public void method(String...y) { System.out.println(y[y.length -1].charAt(0)); }
1 Answer
0
You want the output? I think it's
1
2