Java 比较两个整数大小并输出最大值
// 声明两个 int 类型的变量 x、y
int x, y;
// 将 62、97 分别赋值给 x、y
x = 62;
y = 97;
// 比较 x、y 的大小,输出其中的大者
if (x > y) {
System.out.println('x is greater than y');
} else {
System.out.println('y is greater than x');
}
原文地址: https://www.cveoy.top/t/topic/j7XG 著作权归作者所有。请勿转载和采集!