package com.shrimpking.t1;
/**
* Created by IntelliJ IDEA.
*
* @Author : Shrimpking
* @create 2024/9/14 18:43
*/
public class IntOverflowDemo
{
public static void main(String[] args)
{
int max = Integer.MAX_VALUE;
int min = Integer.MIN_VALUE;
System.out.println("int Max=" + max);
System.out.println("int Min=" + min);
System.out.println("Max overflow=" + (max + 1)); //溢出
System.out.println("Min overflow=" + (min - 1)); //溢出
}
}
09-13
191
09-09
783
09-12
172