answersLogoWhite

0


Best Answer

Compile Time Polymorphism in Java is when you have the several methods with same name and different parameters and compiler has to decide how to select which method has to run based on the arguments hence the name Compile time polymorphism or method overloading.

User Avatar

Wiki User

โˆ™ 2009-09-21 10:41:21
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar
Study guides

Mixture

1 card
โžก๏ธ
See all cards
5.0
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
1 Review

Add your answer:

Earn +20 pts
Q: What is compile time polymorphism in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Types of polymorphism?

run time ,, compile time polymorphism


Define compile time polymorphism with short examples?

compiler can decide which form of the object should be invoked during compile time.this type of polymorphism is know as compile time polymorphism


Why run time polymorphism is dynamic and compile time polymorphism is static?

Runtime prolymorphism means overriding compiletile polymorphism means overloading


What is dynamic method dispatch in java?

dynamic method dispatch is a technique by which a call to a overridden method is solved at runtime rather than compile time..this is how java implements runtime polymorphism.


What is run time polymorphism?

In run time polymorphism compiler doesn't know about way of execution of program that mean decide way of execution at run time while in compile time polymorphism compiler know about the way of execution of program. Example : compile time polymorphism -- method overloading run time time polymorphism -- method overriding


What is the difference between compile time and run time polymorphism?

Runtime prolymorphism means overriding compiletile polymorphism means overloading


What is the difference between run time and compile time in java?

Very simply, Java compile time is when Java is in the process of compiling source code, and run time is when Java is actually executing your program.


What is Difference between dynamic polymorphism and static polymorphism?

Static polymorphism is used the concept of early binding or we can say compile time binding where as dynamic polymorphism used the concept of late binding or run time binding.


Method overridding is run time polymorephism or compile time polymorphism?

Method overriding is runtime polymorphism, because method of which class will be called is determine at run time.


Is late binding and dynamic binding related to polymorphism?

Late binding and dynamic binding are related to runtime polymorphism. By contrast, compile time polymorphism is known as static binding. Template functions and classes are examples of static binding because the exact type can be determined at compile time.


How polymorphism can be implemented in c plus plus?

In C++, compile-time polymorphism is achieved through the use of template metaprogramming while runtime polymorphism is achieved through virtual functions.


How do you compile java programming language?

use the javac keyword to compile a Java program.javac filename.java is the syntax to compile a java file.


How compile time error arises in java?

'Compile time error' is when the compiler (javac) detects an error in your program.


Does java supports polymorphism?

Yes.


What is runtime polymorphism?

Polymorphism is Greek for "many forms". There are two types of polymorphism: static and dynamic. Static polymorphism occurs at compile time and is also known as compile time polymorphism. Dynamic polymorphism occurs at runtime and is also known as runtime polymorphism. Runtime polymorphism is a primary feature of the object-oriented programming paradigm. We achieve runtime polymorphic behaviour by defining virtual methods in a base class which derived classes can then override in order to provide more specialised implementations. Whenever we invoke one of these methods, the most-specialised override is executed automatically. In other words, polymorphic objects will behave according to their runtime type even when the runtime type cannot be determined at compile time.


What is the Command to compile and execute a java program?

javac somefile.java ^that will compile java somefile.java ^that will execute


How do you implement run time and compile time polymorphism?

Run time polymorphism maybe achieved by implementing a particular interface among different class hierarchies, or using the same delegate from different objects. (delegate maybe thought as an interface to invoke methods with different names but with the same parameters. These methods may or may not be of the same object/class)Compile time polymorphism is achieved by classinheritance or implementing an interface.Run time way means the actual implementing class is UNKNOWN (uncertain) at compile time, and maybe injected into your application in real time (through reflection is one way to get dynamic classes). Yet because the runtime object implements the predefined interface (at compile time), the "polymorphism" is achieved.


What is mean by polymorphism in java?

polymorphism is more than one name with different forms


What do you get when you compile a java program?

When you compile a Java source file (.java) you get a Java bytecode file (.class). The bytecode in these .class files can be executed by the Java Virtual Machine.


Is Interfaces in Java a kind of polymorphism?

No. Interfaces in Java are a construct to get polymorphism ( subtype polymorphism ) working in Java, but they are not a "kind" of polymorphism. In polymorphism happens when two objects respond to the same message ( method call ) in different way ( hence poly -> many, morphism -> way or shape : polymorphism -> many ways). In Java to be able to send the same message to two different objects you have to either inherit the same parent, or implement the same interface.


How does java achieve run time polymorphism?

we can achieve by the help of overloading and overrding cocepts and this two methods are help ful in dynamic and static polymorphism.....


What is Compile Time Polymorphism in OOPS?

• Compile time Polymorphism also known as method overloading • Method overloading means having two or more methods with the same name but with different signatures LEarn Design Pattern,C#,ASP.NET,LINQ,Sharepoint,WCF,WPF,WWF


How do you make software from a simple java program?

You compile it.You compile it.You compile it.You compile it.


How do you run and compile a java applet program?

One can run and compile a Java applet program by agreeing to the terms and downloading it. It is possible to get a compiler online that will compile and run Java programs.


How Can you Implement Polymorphism in Java?

By implementing polymorphism we need to use overloading and overriding Technics in program..