You need convert from Integer to Number and then convert from Number to Long using .longValue
Steps: Integer->Number->Long
See this silly method to find your solution ;).
(Silly as is done step by step without shortcuts)
public Long convertFromIntToLong(Integer num){
Integer numAsInteger = num;
Number numAsNumber = numAsInteger ;
Long numAsLong = numAsNumber.longValue();
return numAsLong;
}
I hope,it helps.
No comments:
Post a Comment