我制作这些代码只是为了好玩,因为我是一个 15 岁的 Java 初学者,但不知道问题出在哪里,以及在“lol”方法之后要放什么谢谢你的帮助
public class mathClass {
static int a = 10;
static int b = 15;
static int c = 22;
static int result = 0;
static double counter = 0.25;
public static void main(String[] args) {
double resultone;
double resulttwo;
double resultthree;
double resultfour;
double resultfive;
resultone = a + b;
resulttwo = a + c;
resultthree = a * c;
resultfour = b / c;
resultfive = b % a;
lala(resultone);
lala(resulttwo);
lala(resultthree);
lala(resultfour);
lala(resultfive);
}
public static void lala(double output) {
result++;
System.out.println("result " + result + " is " + output);
}
public static void lol() {
while(counter < 10){
counter++;
int number = 0;
number++;
System.out.println("Counter "+ number + " is " + counter);
}
}
}