I have no errors when public static void main(String[] args) is not in the program, but when I put it in everything becomes a mess.
package classexample;
public class ClassExample
{
public static void main(String[] args)
{
int Power = 0;
int Speed = 0;
int TraveledDistance = 0;
void changePower(int newValue)
{
Power = newValue;
}
void changeSpeed(int newValue)
{
Speed = newValue;
}
void changeTraveledDistance(int newValue)
{
TraveledDistance = Speed + Power;
}
void printStates()
{
System.out.println("Power: " + Power + "Speed: " + Speed + "Traveled Distance: " + TraveledDistance);
}
}
}