what is new in class object? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is new in class object?

16th Jul 2016, 8:51 AM
Jeet Kothari
4 Answers
+ 2
It's used to create/instantiate a new object. MyObject obj = New MyObject(); ... now you can assign properties to your new object obj.propertyName = foo; and use them somewhere bar = obj.propertyName;
3rd Sep 2016, 3:08 AM
Mike
Mike - avatar
+ 1
it's mean you allocated a place in memory for the object you instatiated
19th Jan 2017, 1:12 PM
Gusti Arya
Gusti Arya - avatar
0
it's an instance constructor used to create an instance of a class...
19th Jul 2016, 3:28 PM
Clayton Royes
Clayton Royes - avatar
- 1
You can also overwrite that New method, with your own for the sake of initialization, like Database connection should be connected first before the other. And in the class destuctor, put Database Connection disconnect method.
24th Jul 2016, 10:20 PM
Rezza Prayogi
Rezza Prayogi - avatar