reference will act as variable to point an object. Instead
of giving direct memory location(using pointers)to the
programmer java internally converted them into references,
so that java can avoid memory leaks and increase performance
in accessing object.
c++ supports one more type of variable called reference
variable.In addition to pointer variable and value variable
of creference variable behaves similar to both vaule
variable and pointer variable.reference variable has all
acces that variable has.
The reference variable is useful in OOP because it permits the manipulation of objects by reference, and eliminates the copying of object parameters back and forth. It is also important to note that reference can be created not only for built_in data types but also for user defined data types such as structures and classes
As Pointers are not safe and secure which allows us to increament or decreament the memory locations such that we can reach the O.S related files.
So to avoid such insecurities we go with Reference Varaibles where we can't increament or decrement memory location of an object.Even if we try to print the address of the object it prints some hash code
Hai friends I am MCA 2006 passout. Spend time in 1 yr for
teacing and 5 months in small s/w firm. worked in 4 or 5
months in few places. Presently I am writing bank exams. I
want to get back to IT sector. Are there any possibilities.
any growth prospects?. I am having some knowledge in core
and advanced java. I am so desperate. Any suggestions thanks
in advance. u can write to my mail firstname.lastname@example.org