From e8f7f2426f4a0b04bc35763acb55cacf67d58f61 Mon Sep 17 00:00:00 2001 From: Eloi0424 Date: Sun, 26 Nov 2023 15:18:42 +0800 Subject: [PATCH] OK --- src/main/java/com/bytelegend/IntegerOverflow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bytelegend/IntegerOverflow.java b/src/main/java/com/bytelegend/IntegerOverflow.java index b45bc3d..7e8e47f 100644 --- a/src/main/java/com/bytelegend/IntegerOverflow.java +++ b/src/main/java/com/bytelegend/IntegerOverflow.java @@ -2,8 +2,8 @@ public class IntegerOverflow { public static void main(String[] args) { - int oneBillion = 1_000_000_000; - int i = 0; + long oneBillion = 1_000_000_000; + long i = 0; i = i + oneBillion; System.out.println("i=" + i);