I was just reading over some Java code and asked myself why this piece of code:
int my_int = 100;
Long my_long = Integer.my_int.longValue();
would not work giving me the error, "my_int can not be resolved or is not a field" ; however this code would work:
Integer my_integer = new Integer(100);
Long my_long = my_integer.longValue();
Please explain!