Important Question Set Java 220608 202435 Edited Signed Edited Edited
Important Question Set Java 220608 202435 Edited Signed Edited Edited
Important Question
Java Programming
Type 1: Basic Construct in JAVA
1. Create class employee with data member, name and salary accept
data for five objects and display it.
2. Define a class student with int rollno and string name as data members and a method void
SetData ( ). Accept and display the data for five students
3. Define a class circle having data members Pi and radius. Initialize and display values of data
members also calculate area of circle and display it.
4. Define class and object.
5. Explain constructor with its type, Give example of parameterized constructor.
6. Define array. List its types.
7. Differentiate between array and vector
8. Describe the use of any methods of vector class with their syntax
9. Differentiate between method overloading and method overriding
10. Write a program to create vector with five elements as (5, 15, 25, 35, 45). Insert new
element at 2nd position. Remove 1st and 4th element from vector
11. Differentiate between String and String Buffer.
12. Explain dynamic method dispatch in Java with suitable example
13. Explain the four access specifiers in Java
By : Vishal Chavare
By Nitin Sir
2. Define packages. How to create user defined package? Explain with example.
3. List any four Java API packages.
4. State use of finalize( ) method with its syntax.