II B.
TECH II SEMESTER
JAVA PROGRAMMING (R18)
UNITWISE IMPORTANT QUESTIONS
UNIT-1
1. List and explain Java buzzwords. Which factors are making Java famous language?
2. Explain the concepts of Object Oriented Programming.
3. Does Java support multi way selection statement? Justify your answer.
4. Explain copy constructor. Write a program using copy constructor that reads complex
numbers and copies that into another.(Constructor Overloading)
5. Discuss about polymorphism. Explain runtime polymorphism with a program.
6. What are the benefits of inheritance? Explain various forms of inheritance with suitable
code segments.
7. How to instantiate a class in Java program?
8. Explain different types of inheritance with suitable code segments.
9. Write uses of super Keyword.
10. Difference between method overloading and method overriding
11. Explain about Object class.
12. Write a Java program to create multilevel and hierarchical inheritance.
13. Difference between abstract class and interface.
14. Uses of Final keyword in inheritance (or) Explain about final classes, final methods and
final variables?
15. Define String class and explain different methods for Sting Handling
UNIT-2
1. What is package? How do you create a package? Explain about the access protection in
packages?
2. What is interface? Write a program to demonstrate how interfaces can be extended.
3. Explain about the nested interfaces.
4. Create an interface with at least one method and implement that interface.
5. Demonstrate about Reading console Input and Writing Console Output
6. Explain about Random access file operations with an example.
7. Write a program to read content of a file, split the sentences into words and count
number of occurrences of ‘is’ in the given text
8. Give a brief note on the Stream classes
9. Illustrate about various levels of protection provided to the variables or methods within
classes, subclasses and packages in java.
10. Write a program to copy two files into a target file.
11. Explain auto boxing
12. Discuss about generics.
13. Explain about the Console class.
14. Write short notes on Serialization.
UNIT-3
1. Explain about the different types of exceptions used in Java.
2. What is meant by re-throwing exception? Demonstrate with a suitable scenario for this.
3. Write a program to illustrate user defined exception that checks the internal and external
marks if the internal marks are greater than 40 it raise the exception “internal marks are
exceed”, if the external marks are greater than 60 exception is raised and display the
message the “external marks are exceed.”
4. Give the syntax of exception handling and also handle exception occurred during the
execution of divide by zero.
5. Demonstrate nested try statements and finally statements.
6. Explain how to create your own exception in Java program with an example?
7. What is an exception? How is it different from an error? Illustrate briefly the usage of
five keywords in exception handling.
8. Explain thread life cycle and thread creation in Java with example
9. List out the methods in thread class
10. Write a java program to create multiple threads.
11. Explain the advantages of multithreading.
12. What do you mean by multithreading? Develop a simple application program to illustrate
the use of multithreading.
13. Summarize the differences between thread-based multitasking and process-based
multitasking.
14. What is thread scheduling? How to perform this by setting priorities to threads. Explain
with an example program.
15. Explain the Java thread model. Illustrate with an example.
16. List the benefits of multi-threaded programming. Write a program for multi threading.
17. Write a Java program to handle producer-consumer problem using inter thread
communication mechanism
UNIT-4
1. Develop a program to read a file content and extract words using String Tokenized class.
Display the file if it contains the user query term/search key.
2. Judge the purpose of Stack class.
3. Write a program to convert an ArrayList into an array.
4. Illustrate the applications of Map, HashMap utilities.
5. Explain the benefits of the Java collections framework.
6. Write a short note on String Tokenizer and collection interface.
7. Explain collection Framework classes and interfaces.
8. Define random class and explain its associate methods with example program.
9. Define Scanner class and explain its associate methods with example program.
10. Define Formatter class and explain its associate methods with example program.
11. Dictionary class
12. Hash Table Class
13. Accessing a Collection via an Iterator interface, For each alternative
UNIT-5
1. What is an applet? Enumerate the life cycle of an applet in detail
2. Write different methods present in Window Listener interface.
3. Differentiate adapter classes and inner classes with examples.
4. Discuss various AWT containers with examples.
5. What is the significance of Layout managers? Discuss briefly various layout managers.
6. Explain various event adapter classes in AWT and also give their syntaxes in java.
7. Differentiate the following
i) TextField and TextArea.
ii) Menu and MenuItem.
iii) Checkbox and CheckboxGroup
8. Write different types of controls supported by AWT.
9. What is an adapter class? Demonstrate its role in event handling.
10. Describe in detail model-view-controller architecture.
11. What is a Swing? Explain the Component Hierarchy of Swings.
12. How the events of the mouse and keyboard can be handled? Explain with an example
13. What is GUI? Explain the steps to build GUI.
14. Limitations of AWT
15. Explain Event Delegation Model.
16. Discuss about Anonymous Inner classes with example program.