Object Oriented Programming through JAVA
Question Bank
Unit 1
Short Questions:
1. Define class and object in Java?
2. Explain the need of “this” keyword?
3. Define Polymorphism and list its types?
4. Write a java program to print hello world message?
5. Define variable and constant?
Long Questions:
1. Explain in detail about the java buzzwords?
2. Compare procedural and Object oriented programming paradigm.
3. What is constructor? Explain the types of constructors are used in java.
4. What is loop?, Discuss different types of looping statements in java?
5. Develop a java program to print max and min value in an array.
6. Explain briefly about string class and discuss various methods in string class with an
example
Unit 2
Short Questions:
1. Define Package?
2. Define Interface?
3. Define Abstraction?
4. Give the usage of “super” keyword?
5. What is the necessity of overridden methods?
Long Questions:
1. What is package? Explain the process of defining and create a package with suitable
examples.
2. What is Inheritance? Discuss briefly about the types of inheritance in java
3. What are the differences between an interface and class? Explain with suitable examples.
4. Define an interface in java. How are interfaces implemented? How they can be accessed?
5. Explain the types of Access specifiers are used in java and also illustrate with an example?
6. Describe FileInputStream and FileOutputStream with example?
Unit 3
Short Questions:
1. Differentiate Checked and Unchecked Exception.
2. Define thread.
3. Write the syntax of try block without catch and finally blocks.
4. What are Daemon threads?
5. Mention the use of ‘finally’ keyword in Exception Handling.
Long Questions:
1. What is an Exception? List out the keywords for exception handling with example?
2. Compare throw and throws in exception handling with examples.
3. Develop a java program that handles the “Divide-by-zero” exception.
4. How to create threads in java? Illustrate with an example.
5. Describe the complete life cycle of a thread with an example
6. Explain in detail about inter thread communication with example.
Unit 4
Short Questions:
1. Define Event?
2. Explain about Layout Managers.
3. Write a program to create simple Applet?
4. Explain about Button.
5. What is Event Listener?
Long Questions:
1. Explain various Event classes and Event Listener classes to handle keyboard events in
JAVA.
2. What are AWT classes? Explain.
3. Write a java program to implement Border and Flow layout.
4. Explain about a) Choice b) List c) Panel
5. What is Layout Manager? Discuss various types of Layout Manager.
6. Explain Event Delegation Model with a neat diagram.
Unit 5
Short Questions:
1. Explain about MVC architecture?
2. What is Swing in Java?
3. Describe the attributes of HTML APPLET tag?
4. Write about JLabel?
5. Discuss about JTree class?
Long Questions:
1. How to create an applet? Explain with an example?
2. Explain MVC architecture for application development?
3. What is swing? Explain various Swing Components?
4. Differentiate between Swing and Applet?
5. Explain the usage of Swing, Explain about JApplet and JFrame with an example program?
6. Explain the following Swing controls,
a) JCheckBox
b) JRadioButton