GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 67 of 68    Print  
Java Polymorphism
Describe why Java supports only runtime polymorphism?


  
Total Answers and Comments: 2 Last Update: November 02, 2009     Asked by: tariqueanwer 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 17, 2009 08:55:22   #1  
Gaurav_soni Member Since: May 2009   Contribution: 2    

RE: Java Polymorphism

Polymorphism means when an entity behaves differently depending upon the context its being used.Moreover In other words Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. Means polymorphism allows you define one interface and have multiple implementation. That being one of the basic principles of object oriented programming.

The method overriding is an example of runtime polymorphism. You can have a method in subclass overrides the method in its super classes with the same name and signature. Java virtual machine determines the proper method to call at the runtime not at the compile time.

And when java was being developed they removed all hazziness of C++ or things that create a lot of confusion like removed pointer an memory allocationbut still kept things same as c++ so that one migrating from C++ to java doesn't gets a shock that one needs to learn new things. Hence they decoded that every function whould get resolved at runtime only.


 
Is this answer useful? Yes | No
November 01, 2009 13:59:11   #2  
tarun23 Member Since: November 2009   Contribution: 1    

RE: Java Polymorphism
The three ways of polymorphism in Java are method overloading method overridding and method overridding by extending an class. All these results come true when we run our class which is overloading or overidding any method since we run methods at runtime. In this way Java supports polymorphism at runtime.
 
Is this answer useful? Yes | No

 Related Questions

There are three main principals of oops which are called Polymorphism, Inheritance and Encapsulation  
Latest Answer : Abstraction: Involves extracting only the relevant information.Encapsulation: Involves packaging one or more components together.Inheritance: Is a process of creating a new class by adding some features to an existing class.Polymorphism: Is an ability ...
Tags : OOPS

The meaning of Polymorphism is something like one name many forms. Polymorphism enables one entity to be used as as general category for different types of actions. The specific action is determined by 
Latest Answer : Polymorphisam: It can be catagorized into three ways.1. Method Overloading 2. Method Over-riding3. Interface methods implemented differently in different ways in sub-classes.Overloading: Define methods with same name , same return type with different ...

From a practical programming viewpoint, polymorphism exists in three distinct forms in Java: Method overloading Method overriding through inheritance Method overriding through the Java interface  
Latest Answer : Method OverloadingMethod OverridingOperator OverloadingThese are the different forms of Polymorphism in Java. ...

Latest Answer : ans: using Templates ...
Read Answers (2) | Asked by : kavitha

Latest Answer : Server container will call the callback methods like init() etc.. throught which the servlet object is constructed ...
Read Answers (1) | Asked by : prashant

Latest Answer : Object-based language" may be used to describe any programming language that is based on the idea of encapsulating state and operations inside objects. Other than VB and java script examples of object-oriented languages include Simula, Smalltalk, ...
Read Answers (1) | Asked by : abhishek

Latest Answer : other object oriented languages are c++ & simula 67 ...
Read Answers (1) | Asked by : manoj

What is the difference between Aggregation and Composition?(Asked in Polaris Interview for Java Experienced People, on April 11, in Chennai) 
Latest Answer : Aggregation:In aggregation , one object is composed of multiple objects and every object is useless without the relationship. Suppose there is a car object, so car object is useless without the tyre or steering object, and steering object is useless without ...

Latest Answer : 4 ways1. new operator2. using Class  and loading classloader3. Cloning4. de-serialization ...
Read Answers (2) | Asked by : galam

Describe why Java supports only runtime polymorphism? 
Latest Answer : The three ways of polymorphism in Java are method overloading, method overridding and method overridding by extending an class. All these results come true when we run our class which is overloading or overidding any method since we run methods at runtime. ...


 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
 

SOA Concepts

SOA Concepts Today the concept of Service Oriented Architecture has become ubiquitous Evidence from recent years establish that SOA is not just about hype but a part of every major Business environment The truth is Service Oriented Architecture can be beneficial to Business only when it is utilized
 

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
 

C++ Polymorphism

C Polymorphism Introduction Polymorphism is the ability to use an operator or function in different ways Polymorphism gives different meanings or functions to the operators or functions Poly referring to many signifies the many uses of these operators and functions A single function usage or an oper
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

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
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

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