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); } }
5 Answers
+ 5
There is no question.
Your codes misses a space between void and main.
+ 2
void and main isn't written Like that. public static void main(String[] args) { ...
+ 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.
+ 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
+ 1
Code attempt?