I have a bit of a difficult time wrapping my head around this so I hope you guys can help me out here. Why does a[0] get replaced with 400 in this example here
int [] a = {1, 2, 3 } ;
int [] b = a ;
b[0] = 400 ;
System.out.println(a[0]);
while in the example here c remains 2? I just don't understand this.
int c = 2 ;
int d = c ;
d = 1 ;
System.out.println(c);
A short explanation as to why this is happening would be very welcome.