Computer Science, asked by nitinarpit, 1 year ago

what is difference between class and a objed give 10 differences. 50 points

Answers

Answered by Ssingh05005gmailcom
2
I hope u like this..............
Attachments:
Answered by ravi9848267328
0

Answer:

Explanation:

1)Object is an instance of a class.    Class is a blueprint or template from      

                                                                which objects are created.

2) Object is a real world entity

such as pen, laptop, mobile, bed   Class is a group of similar objects.

3) Object is a physical entity.          Class is a logical entity.

4) Object is created through              Class is declared using

       new keyword mainly e.g.                 class keyword e.g.    class Student{}            

     Student s1=new Student();                                          

5) Object is created many                    Class is declared once.

times as per requirement.  

6) Object allocates memory when it is created. Class doesn't allocated memory when it is created.

7) There are many ways to create object in java such as new keyword, newInstance() method, clone() method, factory method and deserialization. There is only one way to define class in java using class keyword.

Similar questions