I am trying to write the following code. but it gives me a mistake, kindly help me.
int six=06; int seven=07; int abc=018; int nine=011; System.out.println("Octal 011 ="+nine); System.out.println("octal O18 =" + abc);
why can't i give 018 and 019 variable. I can give the value 020 and 021 variable. Why is this happening? what is the reason for this. Tell me. I got the following error
integer number too large: 018 int eight=018;
java octal
Kapil
source share