Skip to content

Commit cf454e2

Browse files
committed
full primitive casting test.Test_Char.java
1 parent 36c7671 commit cf454e2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package test;
2+
3+
class Test_Byte {
4+
5+
public static void main(String[] args) {
6+
byte b = (byte) 0xFF;
7+
short h = (short) 0xFFFF;
8+
int i = (int) 0xFFFFFFFF;
9+
System.out.println(b == -1);
10+
System.out.println(h == -1);
11+
System.out.println(i == -1);
12+
}
13+
14+
}

0 commit comments

Comments
 (0)