Unit1&2 ImportantQP
Unit1&2 ImportantQP
PART :A
Unit:1
PART:A
1. Differentiate procedure oriented and object-oriented programming,
2. Illustrate the working of Java Virtual Machine (JVM).
3. Why the main method of Java is assigned as public and static.
4. What is the types of variables in java? Define it.
5. What are the data types supported in Java?
6. What is encapsulation?
7. Define polymorphism.
8. Java is platform independent. Discuss
9. What is the difference between a constructor and a
10. Method?
11. What are the data types supported in Java?
PART :B
1.(i)Discuss on the various features of OOPS concept
(ii) What characteristics makes Java a preferred programming language.
2.Describe operators and operator precedence supported in Java with Examples.
3.Elaborate on various control flow statements and selection statements used in Java
(i)Demonstrate the declaration, Initialization and accessing in different types of arrays.
4.Summarize the usage of constructor in Java with examples.
PART :B &PART :C
1.Write a program using classes to generate student information system.
2.(i) Describe in brief about object class and its methods in Java.Write a program in Java to
create a class ’Box’ which contains three data members for holding width, height and length
of box and two methods ‘area’ and ‘volume’ to calculate and return the area and volume of
box. Create another class named ‘BoxDemo’ which uses Box class.
(ii) Analyse and Develop a simple Java program to sort the given numbers in increasing
order.
OOP Important Questions
UNIT:2
PART:A
1. Define method overloading and Constructor Overloading.
2. Identify the two ways of using super keyword.
3. What is the use of final class in Java?
4. What is an interface? Write the syntax of the interface
5. What is inner class and anonymous inner class?
6. When a class must be declared as abstract?
7. Outline the use of extends keyword in Java with syntax.
8. Differentiate Method overloading and Method Overriding.
9. Can we access parent class variable in child class by using super keyword?
10. What is dynamic method dispatch?
PART :B
2.The abstract vegetable class has three subclasses named Potato, Brinjal and Tomato. Write a
java program that demonstrates how to establish this class hierarchy. Declare one instance
variable of type String that indicates the color of a vegetable. Create and display instances of
these objects. Override the toString() method of object to return a string with the name of
vegetable and its Color.