class is a datatype and object is a variable isn't it ? .. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

class is a datatype and object is a variable isn't it ? ..

Each object is associated with the data of type class.

16th Jul 2017, 3:04 PM
Master Gaurav
Master Gaurav - avatar
1 Answer
+ 1
Yes, you can say classes are user-defined data types. Class: A class is the blueprint for the contents of the objects that belong to it, having variables and defines the operations (function/Methods). Object: An object is an element of a class; objects have the characteristics of their class.like every object of a class have will have the all things that are defined in the class.
16th Jul 2017, 4:43 PM
Ghulam Mustafa
Ghulam Mustafa - avatar