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   interview questions urls   External Links  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 overloading and Overriding. <Giving a 
confusing example to test the concept.>
(also asked in PA Consultancy Group,iflex,Value 
chain,IBM,CTS,Accenture, Tarang>
 Question Submitted By :: Esha Prasad
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>
Answer
# 1
Over loading is polymorphism implementation in same class, 
where two or more methods can share same name differing in 
parameters passed.
Overriding is polymorphism implementation in different 
classes having parent child relationship and the 
funtionality in parent class is over shadowed by the 
funtionality in subclass.
 
Is This Answer Correct ?    2 Yes 1 No
Esha Prasad
 
  Re: Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>
Answer
# 2
Overloading class has different returntype.
overloading comes with in class but overriding comes in two 
classes.
Overloading is resolved at compiletime
Overriding is resolved at runtime.
 
Is This Answer Correct ?    1 Yes 0 No
Rakesh
 
 
 
  Re: Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>
Answer
# 3
overloading means same method name but different parameters 
are passed but overriding means same method name with same 
parameters passed in different classes.
 
Is This Answer Correct ?    0 Yes 0 No
Arthi
 
  Re: Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>
Answer
# 4
overloading : can only be done by changing the type or no.
of parameters for eg:a(int a);
a(int a,int b);


while in case of overriding we can give new definition
without changing the parameters.
 
Is This Answer Correct ?    1 Yes 0 No
Varun
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What are integer overflows and underflows and how to handle them? Wipro2
what is mean by String and StringBuffer? What is mean by Methooverriding and Overloading? Satyam2
What is the return type of a program?s main() method?  2
What is the order of method invocation in an Applet?  1
What is Servlet?  6
Without creating a new object, How you can retrieve a String or other object?  1
What is a package?  1
How a class can implement an interface? SysArc4
Is JRE required to compile Java files ? HCL3
Can we add two byte variables and assign the result to a byte variable ? b=b1+b2 where b,b1,b2 are byte types TCS3
What is the difference between throw and throws?  3
What is an exception?  3
What are concepts of OOPS and how are they implemented in Java? KPIT2
How to print nodes of a Binary tree? TCS1
How do you set security in applets? Wipro1
Define Compiling?  2
Explain break statement and continue statement?  3
What are hot spots in Java programming?  1
how can u apply shallow cloning and deep cloning to create object? Yash-Technologies1
Why we need to serialize the object Geometric-Software3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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