Objects and Classes
Java is an Object-Oriented programming language. As an issue that has the Object
Oriented peculiarity, Java underpins the accompanying essential ideas:
Inheritance
Polymorphism
Abstraction
Encapsulation
Objects
Message Parsing
Classes
Method
Instance
In this part, we will investigate the concepts of Classes and Objects.
Class - A class can be described as an blueprint that declares and defines the
attributes and methods that its objects will implement and use.
Object - Objects are simple real world entities that possess a state and its
characteritic behaviour.
For example, if you consider a real world entity, a labrador dog, then this dog is an object.
However, it belong to the class of dogs. Therefore, the associated class is Dog.
Do'stlaringiz bilan baham: |