core java - Use of polymorphism in object oriented programming

core java - Use of polymorphism in object oriented programming

Hi all, I am digging for an example of polymorphism in object orient programming. Can anyone please help?

View Answers

February 25, 2008 at 5:07 PM

Use of polymorphism in object orient programming ? using Overloading and Overriding Concept

Polymorphism
It is a basic feature in OOP?s Strategy of programming emulated or being followed by high-level languages .
In java it states using of one single interface with a set of actions that is like one name may be referred to different functionality .

For example in creating a java program we create method
void Amount( )
{
-----
-----
}

Amount (int xyz)
{
---
---
}
Amount(int cat)
{
}

Now see carefully here in the small brackets of same method I have assigned three different?int amt, int xyz, int cat? parameters
(parameters are value data like that we assign in method)
this is called Overloading

And in case of same parameters it is said Overriding.

See In both cases method ?Amount()? is being more than one time and this what above definition say ?using of one single interface with a set of actions?.

For further details with examples concerning Encapsulation, Inheritance and Polymorphism chech undersigned URL.

http://www.roseindia.net/java/learn-java-in-a-day/oops.shtml


BaadshahKhan









Related Tutorials/Questions & Answers:
object oriented programming - Java Beginners
object oriented programming  sir, i read in the book tat object oriented program exhibits recurring structures. i want to know "what is meant by recurring structures?"  Hi Friend, Any structure to be occurred over
object oriented programming protocol
object oriented programming protocol  What is object oriented programming protocol? Is it different from objective c protocol programming?? Thanks
Advertisements
Object Oriented Programming in PHP
Object Oriented Programming in PHP  Hi, Which version of PHP supports OOPS. How can I learn Object Oriented Programming in PHP? Thanks (adsbygoogle = window.adsbygoogle || []).push
Is Java object oriented?
Is Java object oriented?  Hi, Is Java object oriented? Thanks   Hi, Java is object oriented programming language. It is supports OPPS concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation All
Object Oriented Programming II
Object Oriented Programming II  Instructions: ->each class to be created must have encapsulated fields, setters and getters methods, and constructors Create a class named "Paper" with the following attributes
Java using Netbeans Object Oriented Programming
Java using Netbeans Object Oriented Programming   I am trying to make a program that uses a main class and a separate class with one public method and one private method. The main method in the main class asks the user for 2
What are the features and advantages of OBJECT ORIENTED PROGRAMMING?
What are the features and advantages of OBJECT ORIENTED PROGRAMMING?  What are the features and advantages of OBJECT ORIENTED PROGRAMMING
object oriented programming data science
object oriented programming data science  Hi, I am beginner in Data...: object oriented programming data science Try to provide me good examples or tutorials links so that I can learn the topic "object oriented programming
Is Java a pure object oriented language?
Is Java a pure object oriented language?   Hi, Is Java a pure object oriented language? thanks   Hi No, Java is an object oriented programming language but not purely a object oriented language. In OOPs programming
java is pure object oriented
java is pure object oriented  java is pure object oriented or not.? reason.?   Java is not pure object oriented language because... are not object 2)It does not support operator overloading multiple inheritance. 3
Object-Oriented programming - Java Beginners
Object-Oriented programming  Write a program to display the names and salaries of 5 employees.Make use of a class and an array.The salary of each employee should increase by 5% and displayed back.  Hi friend, Code
java : object oriented
java : object oriented   (a) Write a class named CarRental... the user for the data needed for a rental and creates an object of the correct... an object of the correct type. Display the total rental fee
Object Oriented
Object Oriented  C++ is Purely object oriented or not .Then why java called purely object oriented
core java code in object oriented manner - Java Interview Questions
core java code in object oriented manner   hi this is komali .i want small code for this question .its very urgent .please send me as soon as possible . i am waiting for code Sports Associations in India
Object Oriented Programming in Java
OOPS acronym for Object Oriented Programming is a model or concept that works around objects and data. Programming language like Java that follow the OOP... is an instance of a class. For a language to be an Object Oriented Programming
fully object oriented language - Java Beginners
fully object oriented language  Is java is a fully object oriented language?if no,why?  Hi Friend, Java is not a fully object oriented... int,float which are not object 2)It does not support operator overloading
Java Object
Java Object         Object is the basic entity of object oriented programming language. Object.../java/master-java/java-object-oriented-language.shtml  
Object-Oriented Language: Java / APIs, Java OOPs
. Java is one of the useful Object Oriented programming language. Other Object..., Lasso, Perl 5,PHP5, VBScript, VBA etc. Java is popular object oriented programming...Java OOPs In this section we will learn Object Oriented (OOPs) Concepts 
Java Training and Tutorials, Core Java Training
Java Training and Tutorials, Core Java Training       Core Java Training Java is a powerful object-oriented programming language with simple code
What is attribute oriented programming?
What is attribute oriented programming?  Hi, What is attribute oriented programming? Thanks
An Overview of Java      Java is a programming language      Java is Object Oriented Programming
; Java as a programming language Java is an Object oriented...; Java as an Object Oriented Language In this section, we will discuss the OOPs... and Object Oriented makes the java powerful to   build the flexible application
Exp.4 Write any C++ programs to demonstrate multiple inheritance concept of an object oriented programming.
Exp.4 Write any C++ programs to demonstrate multiple inheritance concept of an object oriented programming.  (Aim:- The main aim of this experiment is reusability of code and getting idea about classifying objects , identifying
Polymorphism - Java Beginners
first then visit http://www.roseindia.net/java/master-java/java-object-oriented...Polymorphism  type of polymorphism  In Java polymorphism... Or we can also say that a polymorphism is possible in both state Static
Object Oriented concepts
OOP stands for Object Oriented Programming. This is a technique used to develop programs revolving around the real world entities. In OOPs programming... on the following links Object Oriented concepts
Introduction to Java
Java is an open source object oriented programming language... it follows features like encapsulation, inheritance and polymorphism. A java program..., Mike Sheridan under James Goslings decided to develop a programming language
Learn Java Programming
you proficient in the language. Java is an Object Oriented Programming(OOP... in it, Learn Java programming online with tutorials and simple examples... and mobile phones. Career in Java programming is vast and that is why most
object oriented program.. - Java Beginners
object oriented program..  Write a class called RaceCar.java that contains instance variables horsepower, weight, zeroTo60, and milesPerGal.... Create an application class to get input from the user and use it to create two
Object oriented program - Java Beginners
Object oriented program  Write a class called RaceCar.java that contains instance variables horsepower, weight, zeroTo60, and milesPerGal. The value.... Create an application class to get input from the user and use it to create two
Polymorphism - Java Beginners
Polymorphism  what is dynamic polymorphism? with example  Hi friend, Dynamic polymorphism is run time polymorphism. Thanks  The term static polymorphism is associated with overloaded methods because
Java run time polymorphism
Java run time polymorphism  What is run-time polymorphism or dynamic method dispatch
OOPs and Its Concepts in Java
. Java is a object oriented programming  and to understand... certain things common. In object oriented programming classes can inherit some...;    Brief Introduction to OOP Object Oriented
polymorphism - Java Beginners
polymorphism  what is polymorphism? what is the advantage of function..., Please visit the following links: http://www.roseindia.net/help/java/m/method-overloading-in-java.shtml http://www.roseindia.net/java/master-java/method
Polymorphism - Java Beginners
is run (run-time polymorphism) ? Isn't java compiler having such an ability... Q: Isn't it possible to detect the method's associatation, in case of method... Polymorphism means the ability to take more than one form. Polymorphism
polymorphism
polymorphism  can we achieve without overriding polymorphism
Java as a general purpose language
Java as a general purpose language       Java is an Object oriented application programming language... of applications can be written in Java programming language such as any small
Dynamic polymorphism - Java Beginners
Dynamic polymorphism  Develop with suitable hierarchy, classes for point, shape, rectangele, square, circle,ellipse, triangle, polygon, etc. Design a simple test application to demonstrate dynamic polymorphism.. Thanks
Dynamic Polymorphism - Java Beginners
Dynamic Polymorphism  Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism.? Thanks
core java programming question
core java programming question  How to write a java program to list the customer names arrived to a restuarant on a particular date in alphabetical order with arguments as 1 filename yymmdd cust   Hi Friend, Try
Object Orient Programming
Object Orient Programming   I have this program that needs to display multiple taxis. I have the code but there is an error. Could someone tell me where i am going wrong?? import java.awt.*; import javax.swing.*; public
OOP
; Object Oriented Programming which was totally based on the real life entities... for Object oriented  Programming. Previously we used to follow... the object creation process, programmatically. Read more at : www.roseindia.net/java
Inheretance and polymorphism - Java Beginners
in Programming Exercise 1, you must derive the class Circle from the class... information on Java Visit to : http://www.roseindia.net/java/java-conversion/how
core Java programming
core Java programming  Hi, Thanks for ur previous answers.... I need some of these answers also... Bharathi Indian Cuisine is a leading Indian...;TIME:HHMMSS;ITEM1:QTY:PRICE;ITEM2:PRICE2;] They are looking for a Java Program
Java hello world
Java hello world       Java is a high-level object-oriented programming language developed... for compiling and running the program. Java is a case sensitive programming language so
Inheretance and polymorphism - Java Beginners
information. http://www.roseindia.net/java/language/inheritance.shtml http://www.roseindia.net/java/beginners/oop-in-java.shtml Thanks
Java as a general purpose language
;    Java is an Object oriented application programming language developed by Sun Microsystems. Java is a very powerful general-purpose programming... of applications can be written in Java programming language such as any small or large
What is Java?
; Java is a high-level object-oriented programming language developed by the Sun... in the 1990s. Earlier, C++ was widely used to write object oriented programming...://www.roseindia.net/java/beginners/what-is-java.shtml Java programming language is used
What is Java and its history?
;    Java is a high-level object-oriented... object oriented programming languages, however, it was not a platform independent... etc. Start learning Java programming language from our Java programming
Difference between Java and C++
Difference between Java and C++ Java is an Object Oriented... that supports procedural programming and object oriented programming. C++ fully support object oriented programming including four pillar: Data hiding
Core java interview question, object creation.
Core java interview question, object creation.  How can we restrict to create objects for more than five? That means i want only 5 objects, how to restrict to create 6th objects
Core Java Programming - Java Beginners
Core Java Programming  Write a program in Java which initializes the starting date as your birthday and displays the date 90 days later in the format day name, month name, day, year   Hi friend, Code to solve

Ads