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                      
tip   SiteMap shows list of All Categories in this site.
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
Difference between this(), super()?
 Question Submitted By :: Aparna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between this(), super()?
Answer
# 1
this can be pointing to current object.
super can be used for accesing super class metods &varibles.
'this &super' are use full for constructers also .
thes two statements defining first satatement of 
constructer.'this' is used for accesing current class 
constuter.where as super is accessing super class 
constructer.
 
Is This Answer Correct ?    3 Yes 0 No
Venki
 
  Re: Difference between this(), super()?
Answer
# 2
this() can be used to invoke a constructor of the same 
class where as super() can be used to invoke a super class 
constructor.
 
Is This Answer Correct ?    9 Yes 0 No
Janet
 
 
 
  Re: Difference between this(), super()?
Answer
# 3
'this' is a pointer points to the object of the methods 
invokes. super() is used to invoke the super class member 
function.
 
Is This Answer Correct ?    1 Yes 3 No
Bindhu Solomon
 
  Re: Difference between this(), super()?
Answer
# 4
this() call one of user define constructor inside another user constructor of the same class such as this(a), this(a,b) & so on.
super() call one of base class constructor inside  the derive class constructor such as super(a), super(a,b) & so on.
 
Is This Answer Correct ?    4 Yes 1 No
Nikhlesh Gupta
 
  Re: Difference between this(), super()?
Answer
# 5
this & super is a keyword.
"this" is used to invoke a constructor of a same class,
its pointing the same class object.

"super" is used to invoke a superclass constructor and 
accessing the superclass constructor.
 
Is This Answer Correct ?    6 Yes 0 No
Selvan
 
  Re: Difference between this(), super()?
Answer
# 6
This keyword is pointing the same class object.and
super keyword is accessing the superc lass constructor
 
Is This Answer Correct ?    3 Yes 1 No
A .k. Singh
 
  Re: Difference between this(), super()?
Answer
# 7
your ans no.6 is wrong because (superc lass )constructor
 superc lass mence!!!!!!!!!!1
 
Is This Answer Correct ?    3 Yes 0 No
A.k.singh
 
  Re: Difference between this(), super()?
Answer
# 8
1: 'this' keyword is only use to call to parametic      
constructors within the same class.

  2: 'super' keyword is use to call to parametric
constructors of base class.
 
Is This Answer Correct ?    2 Yes 1 No
Anil Kumar Singh
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is AppletStub?  1
What is update method and when it is called?  1
explain the life cycle of thread? CTS5
can u give one sinario when you use Abstract Class and When you use Interface. ITC-Infotech5
what modifiers are used with top-level class?  2
Hi friends, i am new to java. can you explain how java is secured.  1
if i have one string class then how can you achive this class functionality of this class? Fidelity3
What is the GregorianCalendar class? HCL1
whats string ? HCL8
We can write any Java Logics in our JSP. Then why we are using servlets(Controller Layer) to interact with the DAO ? TCS2
what is the difference between sleep() and Wait()? Accenture4
String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ? Flextronics5
In what type of containers, Border layout is a default layout?  3
What is Collections API?  1
How can be define MARKER interfce in java  1
Which Math method is used to calculate the absolute value of a number? Accenture3
What is meant by packages?  2
Name the methods that used to get and set the text label displayed by a Buttonobject?  1
Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.  1
What methods are called, When we navigate from one applet to another applet?  1
 
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