ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1728)
 Advanced Java interview questions  Advanced Java Interview Questions (332)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (147)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
what is the use of reference variable
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
A reference variable is used to refer a particular object
location which resides on a garbage collectable heap
 
Is This Answer Correct ?    15 Yes 7 No
Ravikiran(aptech Mumbai)
 
Answer
# 2
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.
 
Is This Answer Correct ?    4 Yes 0 No
Venkatesh
 
 
 
Answer
# 3
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
 
Is This Answer Correct ?    2 Yes 0 No
Siri
 
Answer
# 4
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.
 
Is This Answer Correct ?    3 Yes 2 No
Aatish Maskariya
 
Answer
# 5
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 
Is This Answer Correct ?    0 Yes 0 No
Seema Yadav
 
Answer
# 6
A refference variable is a variable which will act as a
adress to a object.... in stack area and the object which
is created will get allocated memory in heap area.
 
Is This Answer Correct ?    1 Yes 3 No
Venkatachalapathy
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
whats is the use of final,in which situation final can be used in the application? DNS 2
Adapter classes?   3
When finally clause is executed?   3
give me the answer of this code class A extnds String This code we can write r not in Java? Explain?   4
I want to run a simple hello world java (HelloWorld.java) program using a batch file. How can i run it and how to construct a batch file. Infosys 1
Why Wait and notify are kept in Object class although they are used only with Thread Class Saksoft 2
What is the purpose of having the concept of overloading? Ness-Technologies 6
What is method Overloading in the perspective of OOPS?   6
After compilation of java program we'll get .class code. If it's generated in OS Windows XP will it work on OS Linux? If yes why? If no why? Aricent 5
Can a class extend abstract class or interface? why Wipro 4
How could Java classes direct program messages to the system console, but error messages, say to a file?   2
if am have 100 threads(for ex:T1,T2---T100) how we give priority to these threads and how the system excute these threads   2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com