Java is a great language. However, like any other language, it's not always intuitively obvious how to use its features to get out of a corner you've painted yourself into. This page lists some complaints people have about various Java libraries, and hopefully, will lead to solutions that we can claim to be JavaIdioms.
- DrawingModelOfSwing
- JavaDynamicLoading
- JavaDynamicDispatchAndConstructors
- JavaByteIoInconsistency
- JavaSingletonProblems, AnotherJavaSingletonProblem
- JavaVersioning
- UsageOfInnerClasses
- ConvertingSerializedObjects
- SwingScrollingInconsistency
Not sure where to put this yet, but I find it an annoying syntactical violation of OnceAndOnlyOnce when the class type name is also the constructor:
Employee julie = new Employee(26);
This is common enough that some kind of shortcut should have been devised (or perhaps a long-cut if it's different).
Agreed. TutorialDee, for example, allows the following...
VAR julie INIT(Employee(26));
...as a short form of:
VAR julie Employee INIT(Employee(26));
A version of the RelProject also supported:
VAR julie := Employee(26);
Java, and similar languages, could do with the equivalent.
CategoryJava, IsDot, JavaDesignFlaws, JavaPatterns