NEW
Font size
WorksheetsJava quiz based on inheritance
Total questions: 10
Worksheet time: 9mins
Output of following Java Program?
Derived::show() called
Base::show() called
Run time Error
Compilation Error
Output of following Java Program?
10
20
Compilation Error
Run Time Error
Output of following Java Program?
12
321
123
23
What will be the output of following program?
Base::show() called
Derived::show() called
Compiler Error
Runtime Error
What will be the output of the following program?
Base::show() called
Derived::show() called
Compiler Error
Run Time Error
Which inheritance in java programming is not supported
Multiple inheritance using classes
Multiple inheritance using interfaces
Multilevel inheritance
Single inheritance
What is subclass in java?
A subclass is a class that extends another class
A subclass is a class declared inside a class
Both above.
None of the above.
Output of following Java program?
Base
Derived
Derived
Base
Base
Derived
Base
Derived
Base
Compiler Error
Predict the output of following program
Base
Derived
Compiler Error
Runtime Error
Predict the output of following Java Program
Compiler Error
Grandparent's Print()
Parent's Print()
Child's Print()
Child's Print()
Parent's Print()
Grandparent's Print()
Runtime Error
