package com.imooc;
import java.lang.*;
import java.util.Arrays;
public class Main {
public static void main(String[] args)
{
int a = -1;
long b = (long)a & (long)0xffffffff; //为啥b会等于-1不应该是个正数吗
System.out.println(b);
short c = -1;
int d = c & 0xff;
System.out.println(d); //这里d为255
}
}
HansonQ
相关分类