Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Unit wise Important Questions

UNIT-I
Short
1. Explain the working of short-circuit logical operators in Java
2. What is an inner class? How can you create inner class object outside its enclosing class.
3. What is the difference between comparing two strings using == operator and equals( )
method?
4. Write a java program using this() to invoke current class constructor
5. Explain the significance of each word in public static void main(String args [ ])
6. Name some of the string handling methods
7. Write a program to find sum of elements of an array using for each loop
8. List the purpose of String and String Buffer class
9. Write short note on Jump statements
10. Write java program using ternary operator to find maximum of three numbers
11. What is the purpose of a constructor?
12. Compare String with String Buffer.
13. Why is java architectural neutral?
14. What are the different ways of defining constants in java?
Long:
1. What are the various object oriented concepts? Discuss
OR
What is object oriented development ?Discuss its advantages
OR
Explain the features and benefits of object oriented development
2. Explain the control statements used in JAVA
3. Give an example for declaring an array in JAVA and accessing it.
4. Write a program to check whether a string is palindrome or not.
5. Write a program to find sum of numbers passed as command line arguments
6. Write a java program to simulate the operation of numerical calculator to perform the
functions Addition(+),Subtraction(-),Multiplication(*),Division(/ )
7. Write a java program to read ‘n’ numbers from console and print their sum and Average.
8. What is the difference between a string and String Buffer class? Explain with example
9. Demonstrate the 2-D array with an example program.
10. Give reasons why a string object is immutable. Differentiate between String, String
Buffer and String Builder class.
11. What is an array? How arrays are declared and initialized? Explain with example?
UNIT-II
Short
1. Mention the restrictions of a method declared as static.
2. Differentiate overloading and overriding
3. Write the two uses of super keyword in java
4. What is the use of inheritance?
5. Define Package.
6. Differentiate abstract class and Interface
7. What is the use of ‘super’ keyword?
Long
1. Explain the concept of inheritance and give an example of multilevel inheritance
2. Write about access specifiers in Java
3. Explain how to create a package and import a package with suitable example
4. Write a program to demonstrate dynamic method dispatch and explain
5. Write short notes on Interfaces
6. Write short note on Multiple Inheritance Issues
7. Write a program to demonstrate multilevel hierarchy, Use super to call Super class
constructor
8. Does Java support run-time polymorphism? Illustrate with an example
9. Write short note on Abstract class.
10. Write short note on Final keyword
11. Write short notes on packages
12. Explain about the various forms of interface implementation
13. Explain about method overriding with an example.
14. Differentiate method overloading and method overriding with suitable examples.
UNIT-III
Short
1. Discuss various methods used to create threads.
2. What are the differences between checked and unchecked exception
3. How can thread be suspended from execution
4. Write a program to create a user defined exception
5. What is thread? Give an example.
6. List the different collection classes and interfaces

Long
1. Illustrate how inter-thread communication is achieved in Java with the help of an
example.
2. Differentiate between Multithreading and Multitasking.
3. Explain about exception hierarchy with an example.
4. Explain multi-catch feature in exception handling? Give an example.
5. What is an Exception? Explain how exceptions are handled in JAVA with suitable
example
6. What is synchronization? Explain with example
7. How are threads synchronized? Illustrate with an example.
8. Write a program to create and use user defined exception
9. Write a simple Java program to throw an exception when the minimum balance in the
account is less than 2000.
UNIT-IV
Short
1. List and explain the constructors of String Tokenizer class
2. List the character stream classes
3. Write a Java program to reverse the contents of a given list
4. What is serialization? Which type of objects can be serialized?
5. What are legacy classes?
6. What is comparator?
7. What is the use of wrapper class?
8. Give an example of opening a file and print its content on the console.
9. What is a stream? What are 2 types of stream that Java defines? List 2 I/O classes in each
category
10. List the methods of Object class.
11. Brief about BitSet and Date Classes
12. What is the use of PrintWriter Class.
13. Explain about Bitset and Timer
14. Write short notes on comparators.
15. Define object in java
16. List the different collection classes and collection interfaces
Long
1. Write a Java program to create a list that contains only the common
elements in the given two lists.
2. Explain the use of Map.Entry interface with the help of an example
3. Write short notes on HashTable.
4. Write short notes on Object Class
5. Write short notes on String Tokenizer
6. Write short notes on Hashmap
7. Explain about the wrapper class in detail
8. Write a java program to illustrate the use of string tokenizer
9. Write a Java program to merge the contents of two files into another file.
10. Use comparator interface in collecting framework to sort a list of names in ascending
order
11. Explain the different iterators used for accessing the elements with example
12. Write a java program to print last n lines of a given text file
13. Discuss briefly about java I/O classes.
14. Write a program to demonstrate the implementation of Cloneable and defines the method
clone Test(), which calls clone() in object.
15. Write a program to create a simple list with items
16. Write a program to copy one file content to another file.
17. Write a program to read from console and write to console.
18. Briefly discuss about collection classes and collection interfaces
19. What combination of classes can be used to write and read serializable directs to and
from a file? Illustrate with an example
20. Write a simple java program to read contents from one file and write to another using
Character stream classes.
21. Explain the hierarchy of Byte and Character stream classes and interfaces.
22. Explain about java.util package
23. What is a File? What are the different types of File Constructors. Explain File creation
with an example
UNIT-V
Short
1. What is the use of Check box Group class? Give an example
2. Define Layout manager? List the different layout managers in Java
3. Mention advantages of Swings over AWT
4. Explain the use of layout managers.
5. What is event delegation model?
6. Explain briefly the class hierarchy for Panel and Frame
7. List the different type of controls supported by AWT
8. What are Event Listeners
9. List the different AWT controls.
10. Define swing in java with example.
11. What is Enum? Give an example
12. Write the limitations of AWT.
13. Give the significance of the keyword this in the below statement addMouseListener(this).

Long
1. Explain about event classes and event listeners interfaces.
2. Explain the steps involved in creating and handling menus.
3. Write a Java program to load and display an image
4. Explain the usage of grid layout.
5. Write a program for keyboard even handling.
6. Explain about mouse and keyboard events.
7. Write a Java program to handle Key Events in a JFrame.
8. What are the different types of Layout Managers and write a program to illustrate the use
of Flow Layout Manager.

You might also like