0

About object

can any one understand me about below part 1 abc a ; part 2. new abc(); part 3 abc a = new abc (); part 4 abc a = new efg (); any one define me these part in simple

3rd Mar 2017, 5:38 AM
Amit Singh Rawat
Amit Singh Rawat - avatar
3 ответов
+ 1
part 1: You initialised an object named 'a' that belongs to class 'abc' Part 2: You are creating an object using 'new' By calling the constructor 'abc' of the class 'abc Part 3:You are creating an object 'a' of class 'abc' by calling its constructor 'abc' using 'new' Part 4: I dont think thats possible.ERROR.I am not sure, though.
3rd Mar 2017, 5:45 AM
Meharban Singh
Meharban Singh - avatar
0
yes but part 4 is overriding concept
3rd Mar 2017, 6:29 AM
Amit Singh Rawat
Amit Singh Rawat - avatar
0
Maybe, I am not sure
3rd Mar 2017, 6:58 AM
Meharban Singh
Meharban Singh - avatar