Java 中的操作符 Java中的变量 Java中的比较 Java 中的操作符 public class DemoJava { public static void main(String []args) { int a, b, c; a = 10; b = 20; c = a + b; System.out.println("Value of c = " + c ); c = a - b; System.out.println("Value of c = " + c ); c = a * b; System.out.println("Value of c = " + c ); c = b / a; System.out.println("Value of c = " + c ); c = b % a; System.out.println("Value of c = " + c ); if( a == 10 ) { System.out.println("a is equal to 10" ); } } } Java中的变量 Java中的比较