I have situation which I dont undestand. When I do
System.out.println(1<<30);
I got very big positive number 1073741824. But when I do
System.out.println(1<<31);
I got very low number -2147483648. As I read long type is signed 64 bit long. Max number is 2^63 -1. So here I dont undestand why my shift goes negative(((( Doing
System.out.println((long)(1<<31));
also gives the same result(((
long?