Quote (carteblanche @ Apr 24 2016 12:25am)
sounds like a good start.
did you try calling it from System.out.println when you used it before? if not, then it's a totally different scenario.
Code
System.out.println(range());
another good idea. don't return a boolean.
hmm ok ty
also... this was the code i used void with method:
Code
void range() {
System.out.println("Range is: " + fuelcap * mpg);
}
calling it:
Code
System.out.println("Sportscar can carry " + sportscar.passengers + ". ");
sportscar.range();
EDIT: So the only problem is that i wasn't using string? I'm still not sure how to use string, cuz i haven't covered that in my book yet
EDIT: btw thank you for helpnig
This post was edited by ferf on Apr 23 2016 10:31pm