我尝试通过函数“IF”将变量 NO_OF_QUESTIONS_PER_LEVEL 从值 9 更改为 19
public class Constant {
public static int NO_OF_QUESTIONS_PER_LEVEL = 9 ;
public static int NO_OF_QUESTIONS_PER_LEVEL (int[] args ) {
if( NO_OF_QUESTIONS_PER_LEVEL == 10 ) {
NO_OF_QUESTIONS_PER_LEVEL = 11 ; //i want change value to 11
}
else if( NO_OF_QUESTIONS_PER_LEVEL == 9 ) {
NO_OF_QUESTIONS_PER_LEVEL = 19 ; //i want change value to 19
}
else {
NO_OF_QUESTIONS_PER_LEVEL = 10 ; //
}
}
我的代码中的错误是什么?