Tips for new Java programmers

These pages are intended for programmers who have read about Java, perhaps written a few small programs, and now want to do something more substantial. They assume that you can read Java syntax, know what things like constructors and interfaces are, and understand the mechanisms of inheritance and dynamic binding. For instance if you're a student who did CS1081/1092 and is now doing a third year project in Java (or maybe if you're the supervisor of such a student) you may well find these pages helpful.

While teaching Java training courses, I see the same problems cropping up again and again. These pages should help you avoid these problems, or at least understand what's going on and recover from them.

The good news is that Java programming is really very easy, especially compared to C. The language is designed so that many of the horrid bugs which can occur in C programs are simply not possible. The compile time error messages are good, and runtime errors are clearly and specifically identified. In general, I'm very enthusiastic about Java, and reccommend it for the vast majority of programming tasks.

What follows assumes you're using the JDK - if you're using an IDE you'll see the same behaviour, but it may be presented to you differently.

The rest of these pages cover the following topics:

If you spot errors in these pages, or have suggestions for things to add, please let me know - email js. If you have a problem with Java which these pages don't address, please don't send it direct to me. Don't panic, RTFM carefully, and if you're still puzzled post to the man.cs.java newsgroup where somebody - sometimes me but often not - usually comes up with a good answer.