public static void main(String[] args) { /*常量表达式,通过赋值运算符完成隐式转换 << >>算数右移? >>> 逻辑右移? * */ short s=3; s+=3; // s=s+3;类型不兼容 int h3=6<<3;//左移 //输出键盘输入数的绝对值 Scanner scanner =new Scanner(System.in); int a=scanner.nextInt(); int n=a>>>31; System.out.println(a*(1-2*n)); }