View on GitHub

reading-notes

Reading notes taken while attending Code Fellows classes.

Class 06

Index

Home
Java: Object and Class
Java: Static Keyword
Singleton

Java: Object and Class

Class Object
A class is a template for creating objects in program. The object is an instance of a class.
A class is a logical entity Object is a physical entity
A class does not allocate memory space when it is created. Object allocates memory space whenever they are created.
You can declare class only once. You can create more than one object using a class.
Example: Car. Example: Jaguar, BMW, Tesla, etc.
Class generates objects Objects provide life to the class.
Classes can’t be manipulated as they are not available in memory. They can be manipulated.
It doesn’t have any values which are associated with the fields. Each and every object has its own values, which are associated with the fields.
You can create class using “class” keyword. You can create object using “new” keyword in Java

Tables Source

Java: Static Keyword

Java: Singleton Class

Back To Top