Comprehensive Question Bank for Object Oriented Programming
Department of Information Technology
Question Bank (III Sem 2025-26)
Subject: Object Oriented Programming (3SN02)
Subject Faculty: Dr. P.P. Deshmukh
Unit I
Explain Object Oriented Programming principles with real-life examples.
Explain all primitive data types supported by the Java programming language with suitable examples.
Write ‘for’, ‘while’, and ‘do-while’ programs to compute 4 + 8 + 12 + 16 + … + 80.
What are the applications of Object Oriented Programming?
Explain the features of Java.
What are operators in Java? Explain arithmetic operators in Java with examples.
Explain the types of variables in Java with programming examples.
Explain the software development life cycle (SDLC) in the development of software applications.
Explain the following with examples:
i) Object
ii) Class
iii) MethodWrite a program to demonstrate the nested if statement.
Write a program to calculate one of the operations from addition, subtraction, multiplication, and division using switch and case. Take the operators like ‘+’, ‘–’, ‘*’, and ‘/’ as expressions in the switch statement.
Unit II
Differentiate between default and parameterized constructors with suitable examples.
Explain arrays in Java and write a program to find the smallest element from a one-dimensional array.
Explain how arrays are passed to methods with suitable examples.
Explain class, object, and method in Object Oriented Programming with suitable examples.
What is an array? What are the types of arrays? Explain 1D array with examples.
Explain the uses of the this keyword in Java programming language with examples.
Write a Java program to find the largest among three integers using command line arguments.
Explain strings in Java programming. Write a program to concatenate two strings using String methods and also find out the length of the string after concatenation.
Explain constructor overloading with suitable examples.
Write a program to calculate the area and perimeter of a rectangle using area and perimeter methods and pass length and breadth as parameters to the constructor.
Explain any three methods of the String class with examples.
Explain two-dimensional arrays with suitable examples.
Unit III
Explain all the types of inheritance with examples.
Write a program to implement multiple inheritance using interfaces.
Explain the three usages of the final keyword with programming examples.
Explain the three usages of the super keyword with programming examples.
Explain method overloading and method overriding with suitable examples.
Differentiate between interfaces and abstract classes.
Explain how multiple inheritance is implemented by interfaces.
Explain all the access modifiers in Java with suitable examples.
What is a package? Write a program to create a user-defined package.
Differentiate between method overloading and method overriding.
How to access a package from outside the package?
Unit IV
Write a program to read the content of a file byte by byte and copy it into another file.
Explain all the keywords used in exception handling in Java with suitable examples.
Differentiate between throw and throws keywords with suitable examples.
Write a program to throw a user-defined/custom exception in the program and handle it using try and catch.
Describe exceptions and list the most common types of exceptions that might occur in Java. Give examples.
Explain FileInputStream and FileOutputStream with examples.
Explain important methods from OutputStream and InputStream classes.
Explain BufferedInputStream and BufferedOutputStream with examples.
Explain try, catch, and finally keywords in exception handling.
Unit V
What is a thread in Java? Differentiate between multithreading and multiprocessing.
Write a program to create threads in Java using the Thread class.
Explain the lifecycle of a thread in Java.
Differentiate between the Thread class and Runnable interface for creating a thread. Explain with examples.
Explain the following Thread class methods with examples:
- sleep()
- join()
Explain the concept of thread priority with examples.
Write a program to create a thread in Java using the Runnable interface.
Explain InterruptedException in threads with examples.
Explain the following methods of the Thread class with suitable examples:
- getName()
- setName()
- currentThread()
- getId()
Explain thread synchronization in Java with suitable examples.
Unit VI
What are the various components supported by AWT? By writing a simple application, explain how control can be added.
Integrate the procedure for creating Menu, Menu Bar, and Menu Item. Also, write a Java application to create these components within a frame.
Explain MouseListener and MouseMotionListener interfaces in the event delegation model.
Write a program that accepts two integer values through two text fields and finds out the addition and subtraction of two numbers on button click “Add” and “Sub” respectively. Display the result in a third text field.
Explain the adapter classes and their use in the event handling mechanism.
Explain the KeyListener interface in the event delegation model.
Explain the applet tag and applet lifecycle in detail.
Explain the WindowListener interface in the event delegation model.
Explain the following methods from the Component class with examples:
- add(Component c)
- setSize(int width, int height)
- setLayout(LayoutManager m)
- setVisible(boolean status)
