Oop 2
Oop 2
• Java is an object-oriented programming language. Objects and classes are the basic building blocks of OOP.
• An object is a basic unit of OOP and represents the real life entities like a house, a tree
• Classes create objects and objects use methods to communicate between them.
Object in Java:
• An object is A real-world entity that has state and behaviour.
Class in Java:
• A class is a user-defined type which groups data members.
• In Java language the data members are called fields and the functions are called methods.
CONSTRUCTORS :