CH 2 Class As Basis of All Computation
CH 2 Class As Basis of All Computation
Class
A class is a template or blueprint from which objects are created.
So, an object is the instance(result) of a class.
• Class is a logical entity whereas object is a physical entity
• An object is an instance of a class.
Types Of Access Specifiers :
In java we have four Access Specifiers and they are listed below.
1. public
2. private
3. protected
4. default(no specifier)
class Student1{
int id;
String name;