+ 1

constructor

"Now, upon the creation of an object of type Person, the constructor is automatically called." why is it called type Person? For nearly 2 years i've known it to be as "class" Person in Java.

3rd Jul 2020, 1:53 PM
Tyler Paul
Tyler Paul - avatar
1 Antwort
+ 1
IIRC in C# all types are class based (cmiiw). And as you might be aware of, a class is also a type, a user defined type, to be more precisely. Maybe the sentence can come clearer if it was written as "instance of class Person"?
3rd Jul 2020, 2:26 PM
Ipang