Type conversion in java
class Test
{ 
    public static void main(String args[]) 
    { 
    	int b=  2147483645;
         long c;
        c = b * 2; 
        System.out.println(c);
    }
}

Why the out put of this code is -6 not 42949667290.

Author: code_lonewolf
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer