0

Can you please solve this question?

public class Program { public static voidmain(String[]args{ ^ ^ //fix the variable types string name = "Toyota"; double Engine = 4.7; int year = 2019; System.out.println("Name:"+" "+name); System.out.println("Engine:"+" "+engine); System.out.println("Year:"+" "+year); } }

14th Jul 2022, 1:48 PM
Renu Modi
Renu Modi - avatar
5 ответов
+ 5
There is no question. Your codes misses a space between void and main.
14th Jul 2022, 1:57 PM
Lisa
Lisa - avatar
+ 2
void and main isn't written Like that. public static void main(String[] args) { ...
14th Jul 2022, 1:57 PM
Felix Alcor
Felix Alcor - avatar
+ 2
And maybe to save yourself a little bit of effort you could write System.out.println("Name: " + name); That way the space follows the colon.
14th Jul 2022, 2:06 PM
Ausgrindtube
Ausgrindtube - avatar
+ 2
- a method has two () after its name - correct the basic type name of the variable - a name of a variable should have exactly the same characters if is used two times
14th Jul 2022, 5:40 PM
zemiak
+ 1
Code attempt?
14th Jul 2022, 1:53 PM
Felix Alcor
Felix Alcor - avatar