Sb explain constructor please. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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