In section 15.12.2.5 of the Java Language Specification, it talks about how to choose the most specific method in both cases of methods with fixed arity and methods of variable arity (i.e. varargs).
What I can't find in the JLS is anything about deciding between two methods where one is of fixed arity and one of variable arity however....
I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it.
There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors.
For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative ref...
I wonder if it's reliable to use a construction like:
private static final Map<String, String> engMessages;
private static final Map<String, String> rusMessages;
static {
engMessages = new HashMap<String, String> () {{
put ("msgname", "value");
}};
rusMessages = new HashMap<String, String> () {{
put ("msgnam...
In Java this is the case:
public void method() {
if (condition) {
Object x = ....;
}
System.out.println(x); // Error: x unavailable
}
What I'm wondering is this: Is the fact that x is limited to the scope of the if-statement just a feature of the Java compiler, or is x actually removed from the stack after the if-statement?
...
What means "fresh type variable" in that JLS chapter: http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#190795
...
Java is the language, the JRE is the runtime environment, and the JDK are the development tools? The JLS is the spec that says that the JRE must do x,y,z, and therefore makes Java what it is? Are these views correct, and if not can someone enlighten me?
Are there any things we think are Java but are not? I think I heard that about An...