AIM-Program on class and objects.
OBJECTIVE-To understand & implement a simple java program using classes &
objects & to learn how java treats data & behavior in an object-oriented manner.
TOOLS- Eclipse,Notepad++,Java(JDK)
THEORY-
1] What is class in java?
In Java, classes and objects are fundamental building blocks of object-oriented
programming. A class is a blueprint for creating objects, providing initial values for
member variables and implementations of behaviors (methods).
2] What is object in java?
An object is an instance of a class. A class acts as a blueprint or a template that
defines the properties (fields/attributes) and behaviors (methods/functions) that its
objects will possess. When you create an object, you are essentially creating a
concrete realization of that class blueprint.
3] Why do we use classes &objects in java?