Home > Java Programming > Language Fundamentals > Questions and Answers
Q: |
What is the result of trying to compile and run this program. public class Test{ public static void main(String[] args){ int[] a = {1}; Test t = new Test(); t.increment(a); System.out.println(a[a.length - 1]); } void increment(int[] i){ i[i.length - 1]++; } } | ||||||||||
|
Comment on this Question | |
Name: | |
|