public static void main(String[] args) { byte b=-1; System.out.println((int)(char)b); System.out.println((int)(char)(b & 0xff)); } 请尝试在Eclipse中运行