题目内容
阅读并分析一下代码的输出结果,然后在Eclipse等集成开环境中输入以下程序代码,运行测试,理解运算符的应用。public class ArithmaticOp {public static void main(String[] args) {int a = 5 + 4;int b = a * 2;int c = b / 4;int d = b - c;int e = -d;int f = e % 4;double g = 18.4;double h = g % 4;int i = 3;int j = i++;int k = ++i;System.out.println("a = " + a);System.out.println("b = " + b);System.out.println("c = " + c);System.out.println("d = " + d);System.out.println("e = " + e);System.out.println("f = " + f);System.out.println("g = " + g);System.out.println("h = " + h);System.out.println("i = " + i);System.out.println("j = " + j);System.out.println("k = " + k);}}
查看答案
搜索结果不匹配?点我反馈