Java Question Bank (2nd Sem)
Java Question Bank (2nd Sem)
Java Question Bank (2nd Sem)
Unit 1
2 marks
4 marks
Unit 2
2 marks
1. Define Inheritance. List its types.
2. What is ‘Super class’ and ‘Sub Class’?
3. What are the uses of ‘super’ keyword?
4. State the significance of ‘final’ keyword.
5. What is abstract method?
6. What is abstract class?
7. Define Dynamic binding.
8. What is method Overriding?
9. Define interface.
10. How is multiple inheritance implemented in java?
11. Define Package.
12. List built-in packages of Java API.
4 marks
1. Explain Types of Inheritance with block diagram and syntax.
2. Explain Inheritance with program.
3. Explain Multilevel Inheritance with programming example.
4. Demonstrate the use of super keyword with program
5. What are the uses of ‘super’ keyword?
6. Explain method overriding/polymorphism with the program.
7. Demonstrate Multiple Inheritance with program.
8. What are packages. Explain the procedure to create and import user defined packages in java.
9. Explain built-in (API) packages of java.
Unit 3
2 marks
1. Define event.
2. List various types of Events.
3. What is event handling?
4. State the event associated with button click.
5. List the various Key events.
6. List the various Mouse events.
7. Which package is used for GUI programming in Java.
8. Define component. Give example.
9. What is container? Give example.
10. What is Layout Manager?
11. What is FlowLayout?
12. What is GridLayout?
13. What is Frame?
14. What is the use of following GUI component? (each one may be asked for 2 marks)
a. Button
b. TextField
c. Label
d. CheckBox
e. Text Area
f. Radio Button(also called CheckBoxGroup)
g. Choice (Also called ComboBox)
h. ListBox
i. Menu
j. TextArea
15. What is java.awt?
16. What is applet?(May be asked)
17. What is Listener?
18. What is ActionEvent?
4 marks
1. Explain various events related to KeyEvents.
2. Explain various events related to MouseEvents.
3. Explain exception handling mechanism in java.
4. Explain various GUI components (Any 5).
5. Explain various Layouts?
6. (All journal programs related to events and GUI. Each one may be asked for
Unit 4
2 marks
19. Define multithreading.
20. What are the two ways to implement multithreading in Java?
21. What is Thread Priority?
22. Define exception. Give example.
23. List the methods used in thread life cycle.
24. What are checked and unchecked exceptions
25. What is meant by try and catch?
26. What is the use of ‘finally’ keyword?
27. What is Java bean?
28. What is Stream?
29. What is InputStream and OutputStream?
30. What is DataInputStream?
31. What is FileInputStream and FileOutputStream?
32. What is Reader and Writer?
33. What is java.io package?
4 marks
7. Write a note on thread priority.
8. Explain thread life cycle with neat diagram.
9. Explain exception handling mechanism in java.
10. Differentiate between Multithreading and Multitasking.(May be asked)
11. Explain the two ways to implement multithreading in Java.
12. Journal Program on Thread. (Any one)