运算符9
package operator;
public class Dome1 {
public static void main(String[] args) {
int a = 10;
int b = 20;
System.out.println(a+b);
System.out.println(a-b);
System.out.println(a*b);
System.out.println(a/(double)b);
}
}
package operator;
public class Dome2 {
public static void main(String[] args) {
long a = 234567890l;
int b = 123;
short c = 12;
byte d = 2;
System.out.println(a+b+c+d);//long
System.out.println(b+c+d);//int
System.out.println(c+d);//int
System.out.println(d/(double)c);
}
}
package operator;
public class Dome3 {
public static void main(String[] args) {
//关系符结果:true/false
int a = 23;
int b = 24;
System.out.println(a>b);
System.out.println(a<b);
System.out.println(a==b);
}
}