OK, let's dive right in at the deep end. Things I hate about Java!
- The bizarre lack of unsigned primitives. Why? For a language that is
so aimed towards interoperability and networking, this just seems like
a stupid decision by the language designers.
- Primitives cannot be used as objects. Java wanted to be a completely
object-oriented language, but here it failed. I never understood this,
and was pleased to see that C# has done the right thing in this
respect. (Update: Boxing/unboxing now in Java.)
- No enumerations. Oh, dear lord, why? (Update: Enums now in
Java.)
Oh, disgustingness! Who ever thought that this would be a good idea?
The literal null
has no static type, so how can anyone (and
I'm talking about you, Mr. Compiler!) say which method is the best
match? That's just wrong. Stupid Java! Take a look at the
reference for that one, if you wish. (It's section
15.12.2, if that link doesn't take you to exactly the right place.)
class A { }
class B extends A { }
class C extends B { }
class MostSpecific
{
static void f(A a) { System.out.println("f(A)"); }
static void f(B b) { System.out.println("f(B)"); }
static void f(C c) { System.out.println("f(C)"); }
public static void main(String[] args)
{
f((A) null); // Obvious enough.
f((B) null); // Obvious enough.
f((C) null); // Obvious enough.
f(null); // Yuck!
}
}