Integer overflow remains invisible in Java, so multiplication works fine. However, the literal that you specified is too large and therefore is a compiler error.
, Java , JLS. , , - - .
Sun Java , :
Compiled from "x.java"
class x extends java.lang.Object{
x();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
0: ldc #2; //int 276447232
2: istore_1
3: getstatic #3; //Field java/lang/System.out:Ljava/io/PrintStream;
6: iload_1
7: invokevirtual #4; //Method java/io/PrintStream.println:(I)V
10: return
, , . .