這個哪里出現(xiàn)了問題
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
if(one%2=0){
? ? System.out.println("one是偶數(shù)");
}
? ? else{
? ? System.out.println("one是奇數(shù)");
? ? }
? ??
? ??
}
}
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
if(one%2=0){
? ? System.out.println("one是偶數(shù)");
}
? ? else{
? ? System.out.println("one是奇數(shù)");
? ? }
? ??
? ??
}
}
2021-05-18
舉報
2021-07-16
=是賦值運算符是!
2021-07-12
= 是賦值運算符,?
== 是判斷運算符, 判斷兩個數(shù)之間是否相等,相等返回true, 不相等返回false
2021-06-15
if語句里面要用==
2021-05-18
報得是什么錯呢