java - Line working in IntelliJ, giving an error in Eclipse -
i've had migrate intellij eclipse, , though both using jdk 8 line
framerate = string.format("%s fps", framecount); (where framerate string , framecount integer) throws error in eclipse (stating framecount must object[]) while works fine in intellij.
your eclipse compiling code older version of jdk. right click project, go properties, go java compiler, , set compliance level 8.
in previous versions of java, string.format method expected object[] sec argument. in newer versions, method uses variable arity parameter of type object.
java eclipse intellij-idea
No comments:
Post a Comment