NARASIMHA REDDY ENGINEERING COLLEGE
(Autonomous)
Approved by AICTE, New Delhi & Affiliated to JNTUH, Hyderabad
Accredited by NAAC with A Grade, Accredited by NBA
UNIT - I
1. a) Describe structure of typical Java program with an example.
b) What is the purpose of constructor in Java Programming?
2. a) List the primitive data types available in Java and Explain.
b) Write a Java program to find smallest of two integers.
3. a) Define inheritance. What are the benefits of inheritance? What costs are associated with
inheritance? How to prevent a class from inheritance?
b) Write a program to implement multiple inheritance using interfaces.
4. a) Write in detail about object oriented thinking with example.
b) Define method overloading. Write a program to demonstrate method overloading.
5. a) Define method overriding. Write a program to demonstrate method overriding.
b) Explain the significance of public, protected and private access specifiers in inheritance.
UNIT- II
1 a) Define interface. How to design and implement an interface in Java? Give Example.
b) How can you extend one interface by other interface? Discuss with example.
2 a) Explain the process of serialization with an example program.
b) Define autoboxing and unboxing. Demonstrate with an example program.
3 a) Write in detail about FileInputStream and FileOuputStream classes.
b) How to handle input and output through console in Java?
4 a) What is meant by package? How to define and import packages? Give example program.
b) Demonstrate DataInputStream and DataOutputStream with an example program.
5 a) Discuss FilterInputStream and FilterOutputStream classes.
b) How to perform random access file operations in Java?
UNIT –III
1. a) Write about checked exception, unchecked exception and errors.
b) Write a java program that illustrates the multiple catch statements.
2. a) Explain the keywords try, catch, throw, throws and finally with example.
b) Write a program to throw exception if the given user age is less than 18 using
user defined exception.
3 a) List the differences between process based and thread based multitasking.
b) Write a program to create two threads by extending Thread class.
4 a) How to achieve synchronization using synchronized method? Give example.
b) Write about thread priorities.
5 a) How to achieve synchronization using synchronized block? Give example
b) Write in detail about inter thread communication.
UNIT - IV
1 a) Explain ArrayList class.
b) Write in detail about LinkedList class.
2 a) Demonstrate Stack class with example program.
b) What is the use of StringTokenizer class? Give example program.
3 a) List the differences between array and ArrayList.
b) Discuss about Vector class.
4 a) Explain HashTable class.
b) Write in detail about Random class.
5 a) How the output can be formatted using Formatter class? Give example.
b) List and explain methods and constructors in Date class.
UNIT –V
1 a) List the difference between java applet and application.
b) Compare AWT and Swings.
2 a) Explain life cycle of an applet and write a program to pass parameters to an applet.
b) Write a program to handle mouse and keyboard events.
3 a) Explain various layout managers.
b) Write short notes on delegation event model.
4 a) Discuss about MVC architecture.
b) Write short notes on Button, Label, TextField, TextArea, Scrollbar components in AWT.
5 a) Develop GUI application using frame to register student with details name, age, rollno, gender. Use
appropriate components.
b) Explain JTable, JPasswordField components of swing.