+ 1
Please someone should help me find the bug in this code so it will print those inputs.
public class Program { public static void main(String[] args) { //fix the variable types double name = "Toyota"; int engine = 4.7; String year = 2019; System.out.println("Name: " + name); System.out.println("Engine: " + engine); System.out.println("Year: " + year); } }
10 Answers
+ 6
Estherpraise Aiyeki here is how you should have fixed the code. Next time don't copy paste the code in the description box, save the code in code playground and share it's link here just like i did
https://code.sololearn.com/cA8zXS04C1td/?ref=app
And āāāāāāāā[No Name] , @Estherpraise Aiyei didn't make the syntax error, it was the quiz and the task is to correct the data types.
+ 1
I did exactly this and it still didnāt work
+ 1
Okay...i tried screenshoting it to send, but couldnāt and i have tried what you sent before and it did not work
0
Its normal syntax error not the bug,
Just replace your variable types with this
String name = "Toyota" ;
double engine = 4.7;
int year = 2019;
0
Do This Instead
public class Program
{
public static void main(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);
}
}
0
Thanks
0
š š
0
public class Program
{
public static void main(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);
}
}