234k views
5 votes
The language is Java! please help

The language is Java! please help-example-1
User IiFreeman
by
5.6k points

1 Answer

3 votes

public class Drive {

int miles;

int gas;

String carType;

public String getGas(){

return Integer.toBinaryString(gas);

}

public Drive(String driveCarType){

carType = driveCarType;

}

public static void main(String [] args){

System.out.println("Hello World!");

}

}

I'm pretty new to Java myself, but I think this is what you wanted. I hope this helps!

User Styts
by
5.4k points