From 656823041a15844fabe0c2af0e5f24274fbfa3e7 Mon Sep 17 00:00:00 2001 From: dpeng <630606938@qq.com> Date: Mon, 16 Aug 2021 16:21:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/github/hcsp/datatype/IntegerOverflow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/hcsp/datatype/IntegerOverflow.java b/src/main/java/com/github/hcsp/datatype/IntegerOverflow.java index e476132..37f876f 100644 --- a/src/main/java/com/github/hcsp/datatype/IntegerOverflow.java +++ b/src/main/java/com/github/hcsp/datatype/IntegerOverflow.java @@ -5,7 +5,7 @@ public class IntegerOverflow { // Fix this method to make it output "i=3000000000" public static void main(String[] args) { int 十亿 = 10_0000_0000; - int i = 0; + long i=0; i = i + 十亿; System.out.println("i=" + i);