Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String args[]) {
- int[] a = new int[10];
- int[] b = null;
- for(int i=0; i < a.length; i++)
- a[i] = i;
- b = a;
- System.out.println("Before setting to a5 to 999, b5 = "+b[5]);
- a[5] = 999;
- System.out.println("After setting to a5 to 999, b5 = "+b[5]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment