0

when I add integer number it's show me "integer too large" even if I make it double howto solve this

public class Three {
public static void main(String[] args) {
    int i = 05955555;
}
Waleed
  • 47
  • 3

1 Answers1

1

Try this instead:

int i = 5955555;

In Java, an integer number starting with 0 is interpreted as being in octal base - and in that base, you can't have the digit 9.

Óscar López
  • 232,561
  • 37
  • 312
  • 386