Menu
×
×
Correct!
Exercise:Create a constructor of
class Car
{
public string model;
@(6) @(5)
{
model = "Mustang";
}
static void Main(string[] args)
{
@(3) Ford = @(3) @(6)
Console.WriteLine(Ford.model);
}
}
class Car
{
public string model;
public Car()
{
model = "Mustang";
}
static void Main(string[] args)
{
Car Ford = new Car();
Console.WriteLine(Ford.model);
}
}
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 58 exercises.
Are you sure you want to continue?