ALLInterview.com :: Home Page KalAajKal.com
 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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
How are this and super used?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How are this and super used?
Answer
# 1
this is used to resolve the naming collision between class 
scope var. and method scpoe var.
super is used to the resolve the naming collision between 
superclass member and subclass member.
 
Is This Answer Correct ?    3 Yes 0 No
Niranjanravi
 
  Re: How are this and super used?
Answer
# 2
this() is used to invoke present class constructor.Super()
is used to invoke super class Constructor.
 
Is This Answer Correct ?    5 Yes 0 No
Sucharitha
 
 
 
  Re: How are this and super used?
Answer
# 3
Mainly  this() is used to avoid hidding the field varaibles 
by the varaibles of the methods which are having same name..

super() is used to invoke the super class from sub class...
 
Is This Answer Correct ?    0 Yes 0 No
Sreekar Reddy Vanguru
 
  Re: How are this and super used?
Answer
# 4
this keyword is used to refer the current instance of the
particular class where as super keyword is used to refer the
superclass members.
 
Is This Answer Correct ?    3 Yes 0 No
Ravikiran(aptech Mumbai)
 
  Re: How are this and super used?
Answer
# 5
'this' and super are two keywords in java.
'this' doesn't support inheritance bt 'super' supports 
inheritance.
this keyword is used in two cases
1.to differentiate betn instance and local variables.
2.calling of one constructor from another constructor.
Restriction:this keyword should be written in lowercase &
must used in firstline.more than one 'this' keyword is  not 
used in one block. 
super is used 4 three reason.
1.differentiates betn superclass variable & child class 
variables.
2.calling of superclass constructor in childclass 
constructor.
3.it  is also used in calling of superclass override method
in child class.
restriction:
it must be in 1stline.
must be in lowercase.
 
Is This Answer Correct ?    3 Yes 0 No
Kabita
 
  Re: How are this and super used?
Answer
# 6
this() keyword is use to invoke the current class.
while super() keyword is use to invoke super class.
 
Is This Answer Correct ?    1 Yes 0 No
Shripal
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is light weight component?  3
why interfaces are faster than abstract classes?  2
How can be define MARKER interfce in java  1
what ide u r using and wat version, how wil u build the project etc ?  2
what is custom tags with example? AMDOC1
how many access specifiers are available in java  5
Why non nested classes in java are not having marked as protected access specifier Google1
what is filters and its use? Virtusa2
What services that container provides?  1
What is the relationship between a method?s throws clause and the exceptions that can be thrown during the method?s execution?  2
what is the difference b/w PUT and POST method to send data to the server Mind-Tree2
what modifiers are used with top-level class?  2
What is interface and its use? HCL6
what is private constructor?what are the uses of writing private constructor in our program?  5
Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?  3
what is main purpose of interface? Accenture2
what are depricated methods ? Satyam4
What is Map interface? Wipro2
What is constructor and virtual function?  4
In what circumstances, compiler will supply a default constructor for a class?  4
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com