0

Sb explain constructor please.

public class MyClass { public static void main(String[ ] args) { Vehicle v = new Vehicle("Blue"); } }

5th Aug 2017, 7:49 AM
Dariush Shiri
Dariush Shiri - avatar
1 Réponse
+ 12
You create a new instance of the class Vehicle represented by object v, and then initialize the object with "Blue".
5th Aug 2017, 7:55 AM
Hatsy Rei
Hatsy Rei - avatar