Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain polymorphism in Java.
Answer: Polymorphism allows objects of different types to be treated as objects of a common type. It can be achieved through method overloading and method overriding.

Example:

void drawShape(Shape s) {
 /* method implementation */
 }
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook