0% found this document useful (0 votes)
56 views

Oops Important Questions

Oops_Important_questions

Uploaded by

kunnu2202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Oops Important Questions

Oops_Important_questions

Uploaded by

kunnu2202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Object-Oriented Programming Exam Questions

2022 Exam Questions


Section A: Brief Answer Questions (2x10 = 20)
1. Explain the difference between JDK and JRE in Java.
2. Object is an instance of a class, justify your answer.

3. What is the role of classpath in a Java package?


4. Write 3 uses of encapsulation in Object-Oriented Programming.
5. Explain the difference between throws and throw keyword in Java.
6. Draw a hierarchical diagram of the java.io package.

7. Explain the types of ways to create a thread in Java.


8. Explain generic programming concepts in Java.
9. Draw a hierarchical diagram of Java Swing classes.

10. What is the difference between JPanel and JFrame in Java Swing?

Section B: Short Essay Questions (10x3 = 30)


1. What are the uses of the this keyword? Explain with a proper example.

2. Explain the role of a constructor and how a subclass constructor implicitly


calls the superclass constructor in Java.
3. Write a Java program to copy one image to another.
4. Write a generic Java program that displays the sum if passed numeric data
and merges text if passed string data.

5. Explain the difference between AWT and Swing with a proper example.

1
Section C: Detailed Answer Questions (10x1 = 10)
1. (a) Explain the compilation and execution process of a Java program
with a proper diagram.
(b) Explain 10 features of the Java programming language.
2. (a) What do you understand by polymorphism? Explain the types of
polymorphism with a proper example.
(b) What do you mean by an abstract class? How is an abstract class
different from an interface?

3. (a) Write a Java program that accepts a temperature in Celsius. It


should throw an exception “Temperature Below Normal” when the
temperature is less than 20°C, throw an exception “Normal Tem-
perature” when the temperature is above 20°C and below 40°C, and
throw an exception “Temperature is High” when it is greater than
40°C.
(b) Explain the use of BufferedReader and BufferedWriter classes
with a suitable example.
4. (a) Describe how inter-thread communication takes place in Java with a
thread lifecycle diagram.
(b) Discuss a generic bounded class with the help of a suitable example.
5. (a) Write a Java Swing program that changes the background color when-
ever a user clicks on a button and displays the message “Welcome to
Java Swing.”
(b) Define an event. How is event handling done in Java? Explain with
an example.

2
2023 Exam Questions
Section A: Brief Answer Questions (2x10 = 20)
1. How are objects implemented in Java?
2. What are the limitations of static members?
3. Write a Java program to create a list.

4. List out the types of constructors.


5. Explain try-catch with an example.
6. What is the advantage of a static class in Java?
7. List out various Layout Managers used in Java.

8. Discuss generic programming in Java.


9. Define ServerSocket in Java.
10. Compare thread-based and process-based multitasking in Java.

Section B: Short Essay Questions (10x3 = 30)


1. Compare the Java Runtime Environment and Java Virtual Machine.
2. Distinguish between Procedural Oriented Programming and Object-Oriented
Programming.

3. What is meant by Stream, and what are the types of Streams and classes
of the Streams?
4. Write a short note on the following components:
(a) Label
(b) TextField
(c) TextArea
(d) List
(e) Choice

5. Discuss synchronizing threads and daemon threads.

3
Section C: Detailed Answer Questions (10x1 = 10)
1. (a) Explain in detail about Arrays with syntax and example.
(b) Describe in detail the types of inheritance in Java.

2. (a) What do you understand by a Layout Manager? Illustrate three


types of layouts available in Java with the help of suitable syntax.
(b) Explain the event handling model in Java with a proper example.
3. (a) What is Open DataBase Connectivity (JDBC)? How is it used in
Java database connectivity?
(b) Write short notes on the following:
i. Toggle buttons
ii. Combo box
iii. Tabbed panes
iv. Scroll panes
4. (a) What do you mean by a Constructor? How many types of construc-
tors are available in Java? Explain with suitable examples.
(b) What do you mean by generics in Java? Explain the advantages and
disadvantages of generic programming in Java.
5. (a) Which is the alternative approach to implement multiple inheritances
in Java? Explain with an example.
(b) What do you mean by an Exception? What is a checked and unchecked
exception? Explain exception chaining.

You might also like