references in Java work like pointers, but there are differences: ()
(1) The pointer must point to a memory address, if you do not specify when you define, it will be random (it is likely to create a security risk) but the reference is defined by the default point is empty.
(2) The pointer can be manipulated at will, but the reference can never be manipulated, always point to the object's first address, or change the object that the reference points to.
(3) reference reduces the flexibility of the pointer but more secure and easy to operate.
(4) Reference is a controlled, safe, castrated version of the pointer. Safe, of course, has lost a certain function, but the advantages outweigh the disadvantages.
(5) There is no pointer in Java, but there is a pointer-like thing, reference! For example: String Str=new string ("Helloworld"),
STR is the reference
(6) There is no pointer in Java, but there is a reference, such as Object obj, which is a reference to an object class, has some function of the pointer, but does not allow
int *p = &a;
p + = 2;
Other areas of memory are not mistakenly manipulated.
(7) A reference is just a pointer to the use of a small number of references are not assigned to use when the exception is thrown, null pointer exception can not change the value of the parameter, can only change the parameters
The value of the property is clearly telling us that the reference is the pointer.
Whether there are pointers in Java, and note the differences between references and pointers