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
What is the purpose of having the concept of overloading?
 Question Submitted By :: Maria
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the purpose of having the concept of overloading?
Answer
# 1
Method overloading is one of the ways that Java implements
polymorphism. It allows related methods to be accessed by
use of a common name. Use it when you actually do need
multiple methods with different parameters, but the methods
do the same thing.
 
Is This Answer Correct ?    1 Yes 0 No
Narendra
 
  Re: What is the purpose of having the concept of overloading?
Answer
# 2
overloading is used to achieve reusability and extensibility
 
Is This Answer Correct ?    2 Yes 1 No
Vinay
 
 
 
  Re: What is the purpose of having the concept of overloading?
Answer
# 3
Overloading is actually belongs to the concept of 
Polymorphism the most important feature of OOP.
And it simply means "Ability to take more than one form".

In a Progarm when a same method(having ame name, return 
type,argument list) is used to perform multiple or 
different tasks its called as method overloading.
 
Is This Answer Correct ?    0 Yes 1 No
Ajay Kumar Sharma
 
  Re: What is the purpose of having the concept of overloading?
Answer
# 4
Suppose u write a method having two parameter and name of
that method is sum..................that is

public void sum(int a, int b)
{

}
Now suppose later the requirement is modified and u have to
told now sum method should pass three parameter in subclass,
and both the parameter which is called in superclass should
be same............what u gonna do .........

So u have to write to method in subclass one with two
parameter and another with three parameter and suppose again
the parameter increased and due to which u have to write 100
method like that...........that is sucide attempt for a
developer.

So sun told dont worry use the concept of overloading....
same class name with different parameter.......no need to
write the different method........for the same task....

use same method with different parameter is called overloading.
 
Is This Answer Correct ?    2 Yes 1 No
Anjani Kumar Jha
 
  Re: What is the purpose of having the concept of overloading?
Answer
# 5
Some times same Object should act differently in differnet 
places and in different time . In that case java goes with 
overloading.
 
Is This Answer Correct ?    1 Yes 1 No
Geeta
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to perform Singleton of the java class object on multi JVM?  1
What is the difference between a Window and a Frame?  1
without using arthematic operation ,how can you write the logic for adding/substraction/multiplication? Wipro4
What is the difference between panel and frame ? IBM4
explain System.out.println IBM41
what is the use of abstract class and interface with example? DNS2
why interfaces are faster than abstract classes?  2
What is inheritance?  4
what is difference between perfom() & excute() ? IBM2
What are Encapsulation, Polymorphism and Inheritance?  2
What is the difference between this() and super()? TCS11
what is the difference b/w PUT and POST method to send data to the server Mind-Tree2
Difference between String & StringBuffer Wipro6
Why we can not force Garbage Collection?  5
What is an array and a vector? How they different from each other?  3
Difference between String and String Buffer?  3
Is it possible to write static method in abstract class? justyfy your answer? Hexaware3
Why we need to serialize the object Geometric-Software8
what is diffrence between .NET and java?  2
How are commas used in the initialization and iteration parts of a for statement?  2
 
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