Re: Help with Symbol Error
The error is very explicit: the compiler cannot find a class named Bicycle.
Have you created a Bicycle class or are you skipping ahead in the tutorial without going through the earlier steps?
db
Re: Help with Symbol Error
is this the code for the class? and where does it need to be?
Code:
class Bicycle {
int cadence = 0;
int speed = 0;
int gear = 1;
void changeCadence(int newValue) {
cadence = newValue;
}
void changeGear(int newValue) {
gear = newValue;
}
void speedUp(int increment) {
speed = speed + increment;
}
void applyBrakes(int decrement) {
speed = speed - decrement;
}
void printStates() {
System.out.println("cadence:" +
cadence + " speed:" +
speed + " gear:" + gear);
}
}
Re: Help with Symbol Error
Never mind, your input has allowed me to fix it myself, thank you.
Re: Help with Symbol Error
Quote:
Originally Posted by
TANKDS
is this the code for the class? and where does it need to be?
Um, you said
Quote:
Originally Posted by
TANKDS
I am following the Oracle tutorials for learning Java
It's all there in the tutorials. Why should anyone have to repeat the same things here?
db