문제

I am using JDK 1.7 and getting the error "binary literals are not supported at this language level" when I attempt to use expressions such as:

 int x = 0b000001;

I thought binary literals were supported by 1.7?

도움이 되었습니까?

해결책

Solution in Intellij 13.2 and similar: Select menu choice File/Project Structure. The following dialog appears:

enter image description here

Set Project language level to be what is needed (7.0 for binary literals).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top