short overflow
public class Main {
public static void main(String[] unused) {
short i = Short.MAX_VALUE;
System.out.println("i=" + i++);
System.out.println("i=" + i++);
System.out.println("i=" + i++);
}
}
Output:
i=32767
i=-32768
i=-32767