I have a line that looks like
if(numb2 < 10000000000000 & numb2 > 100000000000){
So, in Eclipse it says that 10000000000000 and 100000000000 are both from the integer literal range. Specifically
A literal of 1,000,000,000,000 of type int is out of range and a literal 1,000,000,000,000,000 of type int is out of range.
I changed the line so that it looked like
if(numb2 < 1000000000*10000 & numb2 > 100000000*1000){
but if you dialed a number in that range, he just said
Exception in thread "main" java.lang.NumberFormatException: For input string: "5555555555555"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at twothousandthirteen.LuckyNumber.main(LuckyNumber.java:12)
I would like to know if there is a way to expand the literal range of numbers or do something to fix the problem.
Thanks KMehta p>
source
share