+ 2
what is new in class object?
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;
+ 1
it's mean you allocated a place in memory for the object you instatiated
0
it's an instance constructor used to create an instance of a class...
- 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.