Java QB

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

SCHOOL OF ENGINEERING

Department of AIML
QUESTION BANK
JAVA PROGRAMMING
SubjectCode: MR20-1CS0106

UNIT-I
1. List and explain the features of object oriented programming.
2. What is Type Casting? List and explain types of type casting methods with
suitable example.
3. List the primitive data types available in Java & explain.
4. Define Constructor. Illustrate various types of Constructors.
5. Explain about control statements in java with example.
6. Describe different levels of access specifies in Java.
7. Define an Array. How do you declare and access the array in java? Give an
example.

UNIT-II
1. Define Inheritance. Explain the following with suitable example
a) has-a-relationship
b) is-a-relationship
2. Explain about prevention of Inheritance with suitable example.
3. a)
Explain Super and “this” key words with suitable example.
b)
Why Java does not support multiple Inheritance and Hybrid Inheritance?
Explain it.
4. a) Illustrate method overloading and method overriding.
b) What is Polymorphism? Explain the concepts of polymorphism with suitable
example.
5. Define an abstraction. Illustrate abstract classes and its methods.
UNIT-III
1. What is meant by interface? State its need and write syntax and features of
interface with example program.
2. a) Explain how interface is used to achieve multiple Inheritances in Java with
suitable example.
b) Differentiate between interfaces and abstract class?
3. Define package. How to create and access user defined package in Java? Explain
it.
4. a) What are the ways to access package from another package? Explain with an
example.
b) Write a java program to extend interface assuming suitable data.
5. a) Define inner classes. List and explain types of Inner Classes with suitable
example.
b) List any five built-in packages from Java API along with their use.

UNIT-IV
1.
Define exception. How an exception can be handled in Java? And also List
the benefits of Exception Handling.
2.
a) What are try, catch, and finally keywords in java? Explain it with an
example.
b) Differentiate between Checked and Unchecked exceptions?
3.
Explain the usage of throw and throws keyword in Exception Handling.
4.
a) Explain in detail the process of creating thread with an example.
b) What is a thread? Explain the states of a thread with a neat diagram. (Thread
Life Cycle)
5. a) Discuss about producer consumer pattern with an example.
b) Distinguish between multi-tasking and multi-threading?
c) How do we set priorities for threads? Explain it.
UNIT-V
1. Explain the concept of Java collection frame. Write a brief overview on it.
2. a) Explain briefly about Vector class with an example.
b) What is hash table? Explain with an example.
3. a) Demonstrate about stack class with an example.
b) Explain briefly about Array List with an Example.
4. a) Illustrate text input/output File operations.
b) Illustrate binary input/output file operations with examples.
5. How a file can be managed using file class? Explain it.

You might also like