Assignment 1 Java
Assignment 1 Java
Q.1 What is Java? What is the difference between JDK, JRE, and JVM? Explain about OOPs
concepts used in Java with example.
Q.2 Why is Java a platform independent language? How is Java different from C++?
Q.3 What are the various access specifiers in Java? Describe the finalize method with example.
Q.4 Define Class, Method and Object? Show the syntax to define these in java.
Q.5 Define package? Explain the importance of package in java with example.
Q.6 Recall Inheritance? Illustrate the types of inheritances. Write a java program to implement
multilevel inheritance concept.
Q.7 Discuss the criteria’s for applying the concept of interface and abstract class in the context of
Java programming. Take an appropriate programming example to support your criteria’s.
Q.8 Explain the following concepts with an example of each :
(i) Abstraction (ii) Class Hierarchy (iii) Encapsulation (iv) Polymorphism (v) Dynamic Binding
Q.9 Describe the uses of final and super keywords with respect to inheritance.
Q.10 Define class Student with suitable data members create two objects using two different
constructors of the class.
Q.11 Write a program to initialize object of a class student using parameterized constructor.
Q.12 Write a program to implement single level inheritance assuming suitable data.
Q.13 Write a program to define class Employee with members as id and salary. Accept data for
five employees and display details of employees getting highest salary.
Q.14 What is an Array? Explain types of arrays in Java with example. Write a Java program to
read and display the array elements in order.
Q.15 What is a Constructor? Explain types of Constructors in Java? Write a java program to find
the Area of Circle using Constructor. Discuss about the static, final keywords with an example.