You are currently viewing Newb Question: Why can’t I assign numbers beginning with zero to variables?

Newb Question: Why can’t I assign numbers beginning with zero to variables?

I was practicing with some number to char type conversions questions and noticed that I can’t assign a number to say an int variable, beginning with zero (like “097”) without getting an error like “Unexpected tokens (use ‘;’ to separate expressions on the same line) Unsupported [literal prefixes and suffixes]”.

I’m a bit of a newb to the Kotlin language and was curious – why can’t the compiler compile this?

submitted by /u/AshankoTheGreat
[link] [comments]