import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;
public class Demo03 {
public static void main(String[] args) {
//关系运算符返回的结果:正确or错误
int a = 10;
int b = 20;
int c = 21;
System.out.println(c%a);//c除以a的余数。
System.out.println(c%b);
System.out.println(a%(double)c);//不懂
System.out.println(a>b);
System.out.println(a<b);
System.out.println(a==b);
System.out.println(a==b);
System.out.println(a!=b);
}
}
输出:
1
1
10.0
false
true
false
false
true
Process finished with exit code 0
原文:https://www.cnblogs.com/gracewqy/p/15160990.html