Java-Important Questions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

OBJECT ORIENTED PROGRAMMING THROUGH JAVA- IMPORTANT QUESTIONS

UNIT-1
1. Explain the Java Buzzwords.
2. Explain in detail about different concepts used in Object oriented programming.
3. Write about Data types, Variables, Constants, enumerated data type in java?
4. Write a java program to explain scope and lifetime of a variable in java?
5. What is an operator? Which types of operators are used in java?
6. Explain briefly about type conversion and type casting with examples?
7. Discuss various control structures (if, if-else, switch, loops) available in Java.
8. Differentiate between break and Continue.
9. What is an array? How 1DA and Multi dimensional arrays are declared and initialized?
Explain with example programs.
10. Write a java program to perform matrix addition and matrix multiplication?
11. Discuss about constructors and constructor overloading in java?
12. Write short notes on access control/specifiers and this reference in java.
13. What do you mean by static class and static method with example program?
14. What is recursion? Write a program for factorial and fibonacci series?
15. Explain different String handling methods with example program?
16. Write a Java program to sort a given set of strings in the alphabetical order.
17. Write a java program to display the Fibonacci series without using Recursion.
18. Write a Java program to check whether a given number is palindrome or not?
19. Write a Java program to check whether a given number is Armstrong or not?
20. Write a program to reverse the given number.
21. Write a Java program to print the prime numbers from 1 to N.
22. Write about garbage collector in java with example program?

UNIT-2
1. What is meant by Inheritance and why it is important in Object Oriented
Programming? Explain different types of inheritance supported in JAVA with example
programs.
2. What is the importance of super and final keywords in JAVA? Illustrate with suitable
example programs.
3. What is method overloading and method overriding? Illustrate with suitable example
programs. OR Define polymorphism and types of polymorphism with example OR
Explain about the Dynamic Method Dispatch in JAVA with example program?
4. Explain Abstract classes and Abstract Methods with example program?
5. Define an interface. Explain the definition and implementation of interface in java OR
Explain how interface is used to achieve multiple Inheritances in Java.

6. What is an interface? Explain how to extend an interface with program?

7. What is need of inner class/nested classes in JAVA? Explain different types of inner
classes with example programs?
8. What is a package? How to create and accessing user defined package in java with
example program?

UNIT-3
1. What is an Exception? Explain different types of Exceptions in JAVA?
2. Explain Exception Handling Mechanism in JAVA (try,catch,finally,throw,throws) with
example programs?
3. Explain the procedure to create a User Defined Exceptions in JAVA with an example
program.
4. Write the differences between multiprocessing and multithreading?
5. Explain thread life cycle and Explain the 2 ways of creating a thread with example
programs?
6. Write about Interrupting threads and thread priorities with example programs?
7. Explain Inter-Thread Communication with Producer and Consumer problem?

UNIT-4
1. What is Java Collections Framework and Explain Array List class, Vector class and Hash
table and stack class with example programs?
2. Write about lambda expressions in JAVA and with an example program.
3. Explain FileInputStream and FileOutputStream class with example program?
4. Explain about file class methods with an example program.
5. Discuss the four types of JDBC drivers with suitable diagrams.
6. Explain the steps in connecting JDBC?
7. Write a program to retrieve data in database using JDBC??

UNIT-5
1. Explain AWT and swing hierarchy in java and Write some differences between AWT
and Swings?
2. Explain i) JButton ii) JLabel iii) JTextfield iv) JTextArea with example programs.
3. Explain i) Border layout ii) Grid layout iii) Flow layout with example programs.
4. Explain about Delegation Event Model and Write some Event classes and Event
Listeners in Event handling Mechanism?
5. Explain how to handle mouse events with example program.
6. Explain how to handle key events with example program.
7. Explain Adapter class with example program?

You might also like