Java second internals question bank
Java second internals question bank
6 Mention and explain the uses of super keyword in Java with example(3)
10 Explain abstract class and abstract method with suitable code snippet. (3)
14 Give the Comparision between abstract class and interface with programming
example?(3)
15 Differentiate between method overloading and method overriding with
example?(3)
17 Create an abstract class called Employee. Include the members: Name, EmpID
and an abstract method cal_sal(). Create two inherited classes SoftwareEng
(with the members basic and DA) and HardwareEng (with members basic and
TA). Implement runtime polymorphism (dynamic method dispatch) to display
salary of different employees by creating array of references to superclass.(3)
18 Develop a JAVA program to create a class named shape. Create three sub
classes
namely: circle, triangle and square, each class has two member functions
named draw () and erase (). Demonstrate polymorphism concepts by developing
suitable methods, defining member data and main program.(3)
23. With suitable example, demonstrate the working principle of Nested and inner
class?(2)
24. With suitable example, demonstrate how to pass an object as parameter? (2)
25. Show how to return an object in java with suitable example?(2)