GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 37 of 928    Print  
What is method Overloading ? What is this in OOPS

  
Total Answers and Comments: 2 Last Update: October 01, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 15, 2005 11:59:23   #1  
kmhariharan Member Since: September 2005   Contribution: 4    

RE: What is method Overloading ? What is this in OOPS...

Method Overloading : In oops it is Polymorphism (i.e) one which takes more than One Form. Method Overloading means same method Name and Different arguments or parameters.

Example

public class ...

{

public int add(int x int y)

{

.....

}

public float add(float x float y)

{

....

}

}


 
Is this answer useful? Yes | No
October 01, 2007 23:50:50   #2  
aravind.dev Member Since: October 2007   Contribution: 1    

RE: overloading does not mean polymorphism
Its a common mistake to assume that overloading is a kind of polymorphism in OOPS..
But its actually not..
However the definition is the same.. an entity existing in different forms is called polymorphism..
in Java polymorphism is achieved with super class reference variable..


This means a subclass object exists in diffrent reference variables.i.e. the sub class reference variable can hold a reference to sub class object
as well as
the super class ref varibale can hold a ref to super class object...

This is true ploymorphism..

eg: let A be super class of B

B b new B();
A a b;

// this is correct polymorphism. an object is representable using its own reference variable or a super class reference variable...

source : khalid moghul SCJP 1.4
Thanks:
Aravind

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : No it won't work.Only one main methods is allowed ...

Latest Answer : We need not call the finalize() method directly. The method is called automatically by the garbage collector when it determines no more references to the object exist. But when we need to clean-up non-Java resources ie closing a file, we need ...

Latest Answer : Finally method is executed whether the exception is raised or not and normally used to close the resource that are opened in the before. ...

Latest Answer : Its a common mistake to assume that overloading is a kind of polymorphism in OOPS..But its actually not..However the definition is the same.. an entity existing in different forms is called polymorphism..in Java, polymorphism is achieved with super class ...
Tags : OOPS

Latest Answer : Method Overriding means methods having the same method name,same number of arguements or same type of arguements.Here we use super() method to pass the arguements to the methods in the baseclass. ...
Tags : OOPS

Latest Answer :      method represents the behaviour of an object ...

Latest Answer : INHERITANCE: Inheritance is the process by which one object can acquire the properties of another. The best example for this is C,C++, and JAVA languages itself. Java is being derived from C++ which in return is being derived from C from where it inherits ...
Tags : OOPS

Latest Answer : Please Check with this example programpublic class StaticExam { static int a=10;public static void main(String args[]){System.out.println(" Welcome to static variable testing");StaticExam s= new StaticExam();s.display();}public void display(){System.out.println(" ...

Latest Answer : overloading is a method ,class having same names but different datatypes in the parameter ...

Latest Answer : There is difference between overloading and overriding. In overriding you can add additional parameter to the function of the base class which does not affect the base class.The respective class(base or derived)will be called depending upon ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

OOPS Tutorials

Object oriented programming OOP is a computer science term used to characterize a programming language that began development in the 1960’ s The term object oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodol
 

C++ Operator Overloading Part II

C Operator Overloading Part II Operator overloading is a very important aspect of object oriented programming Binary operators can be overloaded in a similar manner as unary operators In this C tutorial you will learn about Binary Operating Overloading explained along with syntax and example mosgoog
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What is Common Data Modeling Method

Common Data Modeling is one of the core considerations when setting up a business data warehouse. Any serious company wanting to have a data warehouse will have to be first serious about data models. Building a data model takes time and it is not unusual for companies to spend two to five years just
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

JavaScript Window Object Open Method Part 2

JavaScript Window Object Open Method Part 2 In this JavaScript tutorial you will learn about JavaScript Window Object Open Method features of window object open method scrollbars status titlebar toolbar top width innerHeight innerWidth outerHeight outerWidth and hotkeys mosgoogle center scrollbars S
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape