OOPS THROUGH JAVA
UNIT WISE IMPORTANT QUESTIONS
UNIT-I
SHORT QUESTIONS
1. Define OOP concepts?
2. Distinguish between procedural language and OOPs?
3. Differentiate between class and object.
4. What is meant by ad-hoc polymorphism and pure polymorphism?
5. List advantages of OOP and disadvantages of OOP.
6. Write history of java.
7. What is the significance of Java’ s byte code?
8. What is JVM, JDK, JRE and JIT.
9. Describe a data type and its type and range?
10. Differentiate between print() and println() methods in Java.
11. What are symbolic constants? Explain with examples.
12. Describe a constant?
13. Describe scope and life time of variables?
14. List types of operators?
15. Define type conversion?
16. Define type casting? With an example.
17. Explain the use of ‘ for’ and for each statements in Java with an example.
18. Define enumerated types?
19. Define an array and its types.
20. Define this reference?
21. Define constructor?
22. Define recursion?
23. Define garbage collection?
LONG QUESTIONS
1. Differentiate procedural oriented programming paradigm and object oriented oriented
programming paradigm?
2. Explain OOPs concepts in detail?
3. What is constructor and write a program to illustrate the use of constructor?
4. Explain how strings are created using string class and list out the methods of string
class?
5. What is method overloading and write a program to illustrate the use of method
overloading?
6. Explain in detail the various operators present in java?
7. What is recursion? Write a program to print factorial of a number using recursion?
8. Define array? Write a program to perform multiplication of two matrices?
9. Write a program to illustrate the use of static variables and methods?
10. What are the various conditional statements present in java? Explain them with a
syntax?
UNIT-II
SHORT QUESTIONS
1. Define Inheritance?List types of inheritances in java?
2. Write about Member access rules.
3. Write Uses of ‘ Super’ keyword.
4. Write using ‘ final’ keyword with inheritance.
5. What is the difference between final, finally and finalize keywords in java.
6. Explain about Object class
7. Define abstract classes.
8. Differences between method overloading and method overriding.
9. Difference between class, abstract class and interface.
10. Define inner class?
11. List out the inner classes?
12. What is method overriding?
13. What is interface?
14. What is a package?
15. Which keyword is used to import a package?
LONG QUESTIONS
Define inheritance. What are the benefits of inheritance? What costs areassociated
with inheritance? How to prevent a class from inheritance?
What is polymorphism? Explain different types of polymorphisms with examples.
What is meant by byte code? Briefly explain how Java is platform independent.
Explain the significance of public, protected and private access specifiers in
inheritance.
What are the various inheritances present in java? Explain with example?
Differentiate abstract classes and interfaces?
Explain about final classes, final methods and final variables?
Explain about the abstract class with example program?
What is package? How do you create a package? Explain about the access
protected in packages?
What is interface? Write a program to demonstrate how interfaces can be
extended?
UNIT-III
SHORT QUESTIONS
Define Exception?
Which class is super class for all the exception classes?
What is the use of throw keyword?
Which exceptions are thrown using throws keyword?
What is a use of finally block?
What is a thread? And thread states?
What is a use of run method?
Which method is used to set the thread priority?
Which method is used to invoke a thread which is in waiting state?
Which keyword is used to synchronize threads?
Write the usage of try and catch
Write the usage of throw, throws and finally
Distinguish between throw and throws?
Distinguish between process and thread?
LONG QUESTIONS
Write about exception handling mechanisms
Write try, catch , and finally with an example
Define throw keyword? Write with an example
Write a program to implement built in exceptions?
Write creation of thread with thread life cycle.
Write with an example how java performs thread synchronization?
What is inter thread communication? Explain in detail.
With a program illustrate user defined exception handling
How to create a user defined exception?
What are the different ways to handle exceptions? Explain.
Differentiate between Checked and Unchecked Exceptions with examples.
UNIT-IV and V
SHORT QUESTIONS
Define AWT class hierarchy?
Distinguish between swings Vs AWT?
Give the subclasses of JButton class.
Differentiate between grid layout and border layout managers.
What are the various classes used in creating a swing menu?
What are the limitations of AWT?
Why do applet classes need to be declared as public?
What are the differences between JToggle buttion and Radio buttion?
What is an adapter class? Explain with an example.
Define JFrame, JApplet, JDialog and JPanel?
Define some of swing components?
Define JButton, JLabel, JTextField and JtextArea?
Define Layout management?
Write Events, Event sources, Event classes and Event Listeners
Describe the relationship between Event sources and Listeners?
Define Delegation event model?
Describe events for handling a button click?
Describe events for handling mouse events?
Distinguish between applet and application?
Write applet life cycle?
LONG QUESTIONS
What is the role of event listeners in event handling? List the Java event listeners
Write an applet to display the mouse cursor position in that applet window.
Discuss various AWT containers with examples.
Explain about the adapter class with an example.
Why swing components are preferred over AWT components?
What is an adapter class? What is their role in event handling?
Explain the life cycle of an applet.
What are the various layout managers used in Java?
What are the various components of Swing? Explain.
Write a short note on delegation event model.
Write in detail about hierarchy for swing?
Write in detail about hierarchy for awt?
Write in detail about Events, Event sources, Event classes and EventListeners
Write program to display a message using an applet?
Write a program for passing parameters to applet?
Explain about mouse handling events with an example.
Explain about key handling events with an example.