What can i do to compile
public static void main(String a)
String s = "test";
case "foo": break;
Hand code the class outside of an IDE, using a text editor, and hand compile it using javac. Language changes regarding JDK 7 will not be available in any IDE until they are definite.
[jsanza@darkstar tmp]$ javac -source 7 A.java
A.java:6: incompatible types
any ideas , what am i doing wrong ?
[jsanza@darkstar tmp]$ javac -version
Not sure if the new language features have been included in the jdk 7 build yet. Possibly not, need to check the release notes per jdk 7 release.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.