/// assignment compatible types import java.io.*; import java.net.*; public class a { final int FI = 2; final int FIBIG = 200000000; void f() { // not marked: OK, as literal value is in byte-range byte b1 = 1; // marked: OK, as literal value is out of byte-range and does not compile byte b2 = 1000; // marked: OK, as char-value cannot be determined and does not compile char c = 0; byte b3 = c; // marked: OK, as literal char-value is out of byte-range and does not compile byte b4 = '\u20AC'; byte b5 = '\n' - 4 + 1800; // literal char-value is in byte-range and compiles fine byte b6 = '\u007F'; byte b7=(short) 0; byte b8 = (long)0; float f1 = 77.3; float f2 = 77.3F; short s1 = 1 + FI; short s2 = 1000000; short s3 = 'F' % FIBIG; char c1 = 0; char c2 = -1 + FIBIG; char c3=(byte) 0; char c4=(short) 0; char c5 = 0L; int i1='d'; int i2 = 1L; } }