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 ?    1 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 ?    0 Yes 1 No
Geeta
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the Set interface?  2
which methods consisting of the serilizable interface?  3
Why we use static and synchronized in method for single thread model example: public static synchronized add(){}  1
What is Collections API?  1
what is the difference between multitasking and multithreading?  8
write a simple program inheritance? Polaris2
What is Distributed Application and what is its usage?  1
Name the class that used to read objects directly from a stream? Wipro2
Program to find greatest prime number in n numbers? Huawei3
What is an enumeration class?  2
Write program to print Hello World and print each character address in that string and print how many times each character is in that string? Ex: H: 0 & 1 e:1 & 1 l :2,3,8 & 3 o:4,6 & 2 w:5 & 1 r: 7 & 1 d 9 & 1 Huawei3
what is difference between global methods and local methods?  1
Explain the differences between public, private, protected and static?  3
When we can access the static data member without creating the object what is the need of the object in java. ssinformatics4
How to send a request to garbage collector?  3
What are Font and FontMetrics classes?  1
how to compile jsp? Logica-CMG3
What is I/O Filter? TCS1
I have 100 records in a table with two rows. I need to display 10 records per page like Google Search. I need only the Logic(Pagination) in Pure Java. No JSP and all..Thanks in Advance... Cybernet2
wht is mean by dirty read?  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