A charset is not an encoding.
We also have
Continue reading “Misnomer: java.nio.charset.Charset”
StandardCharsets. It’s great to have a class with these constants. But UTF-8, UTF-16BE and UTF-16LE are all the same set of charaters: Unicode
The keyword static is arguably a bad choice or naming.
If you look up “static” in a dictionary you find many meanings, none of which explains its use in programming languages. So why is it used in Java, and how is it misunderstood?
Continue reading “Misnomer: static Keyword”
In my category for Java Misnomers I really should write about this silly interface.
Continue reading “Misnomer: Cloneable”
Continue reading “Misnomer: String.length()”
String.length() gives the length of the String, right? Or does it?
So it’s functional, right? Then why isn’t it a function? I’ll try to explain.
Continue reading “Misnomer: @FunctionalInterface”
So there’s a class named Class. But it represents interfaces, annotations and enums too. What’s up with that?
Continue reading “Misnomer: The class named Class”
Some think “List” is a misnomer. I don’t even mind so much. I think List is ok.
I just put this here because there already is an entry in the FAQ:
Why don’t you rename the List interface to Sequence; doesn’t “list” generally suggest “linked list”? Also, doesn’t it conflict with java.awt.List?
PS: Vector is strange, though. It is synchronized and it really should be
SynchronizedList. But it is defacto deprecated. So who cares?
RuntimeException is thrown at runtime, right?
Continue reading “Misnomer: RuntimeException”
Java does not have pointers. Variables are of primitive or reference type. So it uses references. Then why is there a NullPointerException?
Continue reading “Misnomer: NullPointerException”
The final keyword creates a lot of confusion in the Java world. I’ll try to clear things up a bit. Continue reading “Misnomer: final keyword”