Sunteți pe pagina 1din 3

OOPS USING JAVA

OOP using JAVA Question Bank V – Units


Unit – I
Introduction, Classes and Objects, String handling.
SAQ’s
1. Why JAVA is called robust?
2. What is byte code?
3. Write about static members of java.
4. Differentiate between String and String Buffer.
5. Why is java architectural neutral?
6. Why string is class is immutable.
7. What is the difference between a constructor and a method? Discuss with an example.
8. List the different operators used in java.
9. What is the order of constructor call in the multilevel inheritance? Give example.
10. How to use method overloading for printing different types of array?
11. Define constructor?
12. What is use of String Tokenizer?

LAQ’s
1. Describe the typical structure of a java program and give the steps to execute it.
2. Demonstrate toUpperCase() and toLowerCase().
3. Write a program to print the names of a student in the sorted order of the last name, if
name is in the form of “firstname lastname” using collection.
4. Explain the features and benefits of Object Oriented Development.
5. List the functions defined in String buffer class.
6. Write a program to read the strings and sort the list of strings.
7. Differentiate between String and StringBuffer class. How java converts data into its
string representation during concatenation illustrate with an example.

Unit – II
Inheritance, Interfaces, Packages.
SAQ’s
1. What is the need of an interface?
2. Differentiate overloading and overriding.
3. Under which context do you use final and finalize?
4. Define Garbage collection in Java?
5. What are the advantages of Enumeration?
6.

LAQ’s
1. Write a program to demonstrate the Interfaces.
2. Differentiate method overloading and overriding using an example.
3. Explain creating and using packages in java.
4. What is runtime polymorphism (or) dynamic method dispatch? Explain with an
example.
MD AFZAL
ASST. PROFESSOR
OOPS USING JAVA

5. Write a program to demonstrate creating package and using the created package.
6. Write a short notes on the following:
a. Interface
b. Package
7. Can an interface reference variable refer to an object that implements that interface.
8. State the purpose of finalize() method in java with an example.

UNIT -III
Exception handling, Multithreading.
SAQ’s
1. Illustrate with an example the throw statement by manually throwing an arithmetic
exception.
2. Differentiate between local and instance variables with example.
3. Which are the two subclasses under Exception class?
4. How can thread be suspended from execution?
5. Explain the delegation event model.
6. What is the difference between throw and throws clause.
7. What is the normal priority of a thread and how the priority of a thread can be
changed?
8. How do you restrict access to an object to one thread at a time?

LAQ’s
1. Differentiate throw and throws clause used in java.
2. Write a program for creating and using user-defined exception.
3. Explain the flow of control in exception handling programs with example.
4. What are the different ways of creating thread? Explain any one method with example.
5. Write a program to show the handling of multiple exceptions.
6. Explain isAlive() and join() method with an example.
7. What is the method defined by a class implementing the java.lang.Runnable interface.
8. Write a program to create threads where one thread prints 1 to 100 and another thread
prints 1 to 200.
9. Explain exception handling mechanism with example.
10. What are the various ways of creating thread? Explain any one method with example.

UNIT -IV
Basic I/O Streams, Exploring java.lang, Exploring java.util, Regular Expressions.
SAQ’s
1. What is the difference between “>>” and “>>>” operators.
2. When ParseInt() method can be used.
3. What is the advantage of using adapter classes?
4. What are wrapper classes? List out various wrapper classes.
5. What method is used to read a byte from system.in?
6. Write a code to read a character from console.
7. Define adapter class. Why is it used?

MD AFZAL
ASST. PROFESSOR
OOPS USING JAVA

8. List the four classes used for handling byte streams.


9. What is the use of Data output stream and push back reader.
10. Why user input for primitive types is not permitted directly in java.
11. Write a code to read an integer through console.

LAQ’s
1. Write a program to read two dates and find the difference.
2. Why do we need wrapper classes? Explain about isInfinite() and isNaN() method.
3. How do you use character streams, show with example?
4. With a Java program illustrate the use of I/O streams.
5. Write a program to read the ‘n’ integer values form the console and find the sum of all
values.
6. Write a program to read the integer values from console and check whether it is a
prime number or not.

UNIT -V
AWT & Event Handling, Layout manager, Swings.
SAQ’s
1. Write a program to insert buttons in Border Layout.
2. Differentiate component and container in AWT.
3. What is AWT?
4. Mention the interface which provides the capability to store elements in a collection
that guarantees that no duplicates are stored and all elements can be occurred in natural
order.
5. Mention the differences between closeable and flushable interfaces.
6. Write the interfaces used to print the elements of collection.
7. List the different Layout managers with example.
8. List the different interfaces with methods used for mouse event handling.
9. List the different AWT controls.

LAQ’s
1. Write a program for mouse event handling.
2. Write a program to demonstrate synchronization.
3. Write a program to print numbers in a grid using layout manager.
4. Explain the steps involved in creation and handling of Menus.
5. Explain the use of Comparator with example.
6. Explain the different iterators used for accessing the elements with example.
7. Write a program for keyboard event handling?
8. Explain the steps involved in creation and handling of Menus.
9. What is event handling? Explain the steps involved in it?
10. How is the use of event listeners in java?

MD AFZAL
ASST. PROFESSOR

S-ar putea să vă placă și