Object o = new Long (1);
long l = o; <------------- HERE
IDEA only suggests "Change 'l' type to Object"
, while another/better option would be to cast and obtain:
Object o = new Long (1);
long l = ((Long) o); <--------- ADD CAST HERE
Description
(level language = Java5)
On the code below:
Object o = new Long (1);
long l = o; <------------- HERE
IDEA only suggests "Change 'l' type to Object"
, while another/better option would be to cast and obtain:
Object o = new Long (1);
long l = ((Long) o); <--------- ADD CAST HERE