Object vs Class : Difference between object and class in java

preview_player
Показать описание
Object vs Class | Difference between object and class in java
This Learnaholic India video will cover :
There are many differences between object and class.
First is Object is an instance of a class. whereas Class is a blueprint or template from which objects are created.
Second is Object is a real world entity such as pen, laptop, mobile, bed, keyboard, mouse, chair etc. whereas
Class is a group of similar objects.
Third is Object is a physical entity. whereas Class is a logical entity.
Fourth point is Object is created through new keyword mainly. for example Student s1=new Student(); whereas Class is declared using class keyword for example class Student{} .
Fifth is Object is created many times as per requirement. whereas Class is declared once.
Sixth pint is Object allocates memory when it is created. whereas Class doesn't allocated memory when it is created.
Seventh is There are many ways to create object in java such as new keyword, newInstance() method, clone() method, factory method and deserialization. whereas There is only one way to define class in java using class keyword.

difference between object and class, difference between class and object,
object vs class, class vs object, object vs class in java, java vs object in java,
difference between object and class in java, difference between class and object in java,
examples of object, examples of class, what is object, what is class, what is object in java,
what is class in java, what is object and class, what is class and object,
object in java, java tutorial, java tutorial for beginners,
-----------------------------------------------------------------------------------------------------
#class #object #java #learnaholicindia
-------------------------------------------------------------------------------------------------------
Watch more Java related videos:
Difference between abstract class and interface :

Collections in java :
-----------------------------------------------------------------------------------------------------------
Show Support to Learnaholic India :
Subscribe | Like | Share | Comment
----------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

then that means a class can be as object. Means just like junk food is class and object is burger, pizza, samosa. But, if class is food then object can be healthy food, junk food. Is am right ?

vishmatatahakuna