+ 1

What is the main difference between classes and objects??

28th Aug 2018, 8:56 AM
Adnan
Adnan - avatar
2 Respostas
+ 2
the objects are created from the classes; in the classes you define the characteristics and attributes that the objects will have; the objects will have the characteristics of the type of class to which they belong. "A class is the mold to create objects." ejp: class User {   age = 10;   sex = male;   name = so-and-so; } User person1 = new User (); This case created an object of the User class, therefore this object will now have the characteristics of its class: age, sex, name.
28th Aug 2018, 9:30 AM
Luis Felipe Arroyave Valencia
Luis Felipe Arroyave Valencia - avatar
+ 1
thanks a lot dear friend Luis Felipe Av
28th Aug 2018, 9:33 AM
Adnan
Adnan - avatar