Veda Bites are swipeable micro-lessons — each one teaches exactly one
idea. Here's a taste from this kit; the app has the full deck.
💡 Key Idea
What Is Polymorphism?
One name, many forms.
Polymorphism means 'many forms'. In Java, it allows a single method name or operator to behave differently based on the object that invokes it. It is a core OOP principle that promotes flexibility and code reuse.
↳ Polymorphism lets one interface be used for a general class of actions.
⚖️ Comparison
Compile-Time vs Runtime Polymorphism
When is the decision made?
↳ Compile-time polymorphism is resolved during compilation; runtime polymorphism is resolved when the program runs.
📖 Definition
Method Overloading
Same name, different parameters.
Method overloading is a compile-time polymorphism feature where a class has multiple methods with the same name but different parameter lists (type, number, or order). The compiler decides which method to call based on the arguments provided.
↳ Overloading is about same method name, different signatures.
📖 Smart notes
What you'll study, topic by topic
1
Polymorphism in Java: Compile-Time and Runtime
Polymorphism in Java allows a single method name to behave differently based on the object. It comes in two forms: compile-time (method overloading) and runtime (method overriding). Understanding the difference and how d...
Polymorphism means 'many forms' and is a core OOP principle.
Compile-time polymorphism is achieved via method overloading.
Runtime polymorphism is achieved via method overriding.
~8 min · full explanation, examples & memory tricks in the app
❓ Leveled MCQ practice
Try the smart MCQs from this kit
35 questions laddered from warm-up to topper-level, each with an explanation. A taste:
What does polymorphism mean in Java?
Beginner
A The ability to hide implementation detailsB The ability of an object to take many formsC The ability to inherit from multiple classesD The ability of a class to have multiple constructors
Show answer & explanation
The ability of an object to take many forms
Polymorphism literally means 'many forms' – in Java, it allows an object to be treated as multiple types (e.g., a subclass object as its superclass type).
Which of the following is an example of compile-time polymorphism?
Beginner
A Dynamic method dispatchB Method overridingC Interface implementationD Method overloading
Show answer & explanation
Method overloading
Compile-time polymorphism is achieved via method overloading, where multiple methods share the same name but differ in parameters – the compiler decides which to call.
Runtime polymorphism in Java is achieved through:
Beginner
A Operator overloadingB Method overridingC Constructor chainingD Method overloading
Show answer & explanation
Method overriding
Runtime polymorphism uses method overriding, where a subclass provides a specific implementation of a method already defined in its superclass – the JVM decides at runtime which version to call.
Which of the following methods demonstrates method overloading?
Intermediate
A void print(String s) and void print(String s, int i)B void print(String s) and static void print(String s)C void print(String s) and void print(int i)D void print(String s) and int print(String s)
Show answer & explanation
void print(String s) and void print(int i)
Method overloading requires the same method name but different parameter lists. Option A has different parameter types (String vs int). Option B differs only in return type – not allowed. Option C has different parameter counts – also valid overloading, but option A is the cleare...
🃏 Flashcards
Tap a card to flip it
18 flashcards in this kit — the app reviews them with
spaced repetition so the right card returns on the right day.
The full Veda Bites deck, complete notes, spaced-repetition
flashcards, leveled MCQs, tests and games for this kit — plus
Daily Facts and the Arena, every day.