+ 1

In this java code showing 1 error what is that can u help me.

class Vechile{ int passengers; int fuelcap; int mpg; } class VechileDemo{ public static void main(string args[]){ Vechile minivan = new Vechile(); int range; minivan.passengers=7: minivan.fuelcap =16; minivan.mpg=21; range = minivan.fuelcap * minivan.mpg; System.out.println("minivan carry " + minivan.passengers +"with a range of " + range ); } }

13th Oct 2017, 2:05 PM
Code Race
Code Race - avatar
2 Answers
+ 14
class Vechile{ int passengers; int fuelcap; int mpg; } class VechileDemo{ public static void main(String args[]){ //here was also 1 error 👈 Vechile minivan = new Vechile(); int range; minivan.passengers=7; // here was the another error👈 minivan.fuelcap =16; minivan.mpg=21; range = minivan.fuelcap * minivan.mpg; System.out.println("minivan carry " + minivan.passengers +"with a range of " + range ); } } //this will work buddy & the errors u made were just typing error â˜ș //hope it helps â˜ș
13th Oct 2017, 2:14 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
thanks for your help guys
13th Oct 2017, 2:18 PM
Code Race
Code Race - avatar