我在netbeans7 上尝试jdk7 的新特性, 但是一直出现如下的问题
binary literals are not supported in -source 1.6
(use -source 7 or higher to enable binary literals)我使用了
int b = 0b110011;
做了一个二进制的定义,但确提示不行。。
在netbeans7 中 java平台已经设置为jdk7了
不知道还有哪里的问题
binary literals are not supported in -source 1.6
(use -source 7 or higher to enable binary literals)我使用了
int b = 0b110011;
做了一个二进制的定义,但确提示不行。。
在netbeans7 中 java平台已经设置为jdk7了
不知道还有哪里的问题
然后再选择左边的“库”,确认 “java平台”是1.7 然后刷新工程就OK了/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication1;import java.util.ArrayList;
import java.util.List;/**
*
* @author gaoyong
*/
public class JavaApplication1 { /**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int b = 0b110011;
List<String> list=new ArrayList<>();
}
}