The 8 Nights of Java – Night 2December 25th, 2016 by Jeanne Boyarsky
Continuing The 8 Nights of Java series, tonight we focus on Java 1.2. While Java 1.0 and 1.1 were about establishing a strong base and creating a set of classes that directly interfaced with operating system components, such as threads, Java 1.2 was focused on building on top of that base with convenient and reusable classes. For example, you could create your own dynamic array using the built-in primitive arrays, but do you really want to? Java 1.2 answered this by showing that Java was more than just a language, it was a useful set of reusable tools written by software developers, for software developers.
Java 1.2 Notable Features
Sun released Java 1.2 (codename Playground) on December 8, 1998. This version included:
- Collections framework
- Java Applet browser plug-in
Hard to believe the Collections framework has been with us for so long. It works. There’s lots of collections and opportunities for extension. And I’m thankful we don’t have a Collections2 or Collections3 framework. Something this core is useful to last unchanged. There have been Collection implementations added over time, but that makes sense because it is a framework. Even in Java 8, Oracle added static and default methods so they could leave the interfaces backward compatible.
Fun fact: my very first Java program for school used Java 1.2.
I have to agree with Jeanne on this one. Although the Collections framework was a little difficult to use until generics were added in Java 5.0, they were from the start very powerful. I remember studying linked lists, hash maps, tree sets, and sorting in school. While all software developers should know these concepts and be able to implement them… in production software engineering it’s far better to go with a feature-rich implementation that has been written and tested by hundreds of developers than your own piecemeal solution (aka a “square wheel”).
As for Swing, I’ll be honest and say there was never a time I enjoyed programming in Swing. Even “back in the day” the Swing UI already looked quite dated. It was very difficult to write Swing code that looked good without relying on a number of often proprietary plugins, which required licenses to use. I remember registering for courses online (pilot program at the time, previous students had to do so in person) and a Swing app popped up within the browser, then promptly crashed 4-5 times in a row. I don’t know if the Swing apps I had the misfortune to use were just poorly written, poorly designed, or the underlying technology was just flawed. The one thing I do know is that I have never looked at a Swing app (either one that I’ve written or used) and thought it looked “beautiful” or was “easy to use”.