Advertisement
JeffGrigg

What is output of array references?

Nov 26th, 2018
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.19 KB | None | 0 0
  1. public class Driver {
  2.     public static void main(String[] args) {
  3.         int[] x = {6, 4, 9, 2, 1, 8, 5, 7, 3, 0};
  4.         int a = x[3];
  5.         System.out.println(x[a + 3]);
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement