1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
   | 
 
 
  package 数据类型和运算符;
  public class TsetOperator_1 { 	public static void main(String[] args) { 		
 
 
 
  		byte a = 1; 		int  b = 2; 		int  ans1 = a+b; 	   		 		long c = 3; 		long ans3 = b+c; 	   		 		
 
 
 
 
  		float d = 1; 		float e = 2; 		double f = 3; 		float ans5 = d+e;         double ans6 = d+e;         double ans7 = e+f;                         
 
 
                   
 
 
          System.out.println(9%5);         System.out.println(-9%5);         System.out.println(9%-5); 		 	} }
 
  |