More specifically:

Still more (scandalously basic) trivia! Also, there's no reason you can't have a private constructor if you really, really want one. Don't let kill-joys tell you there is. Here, have a look at this:
// For your pleasure alone, I have used hardlinks in lieu
// of syntax highlighting. Enjoy.

public class LookyHere extends FancySecretSuperClass {

   private LookyHere (String str) {
      super(str);    //this string does something important
   public LookyHere (Integer i) {
   public LookyHere (Object o) {
   public LookyHere (char[] chrs) {
      this(new String(chrs));
   // etc.

It makes sense in the same way using accessors to fiddle with your member variables does. Granted, it's kind of a trivial example. (I had intended to pass in the different possible parameters for a Connection object, but I'm lousy at that database stuff and it would never have compiled. Hell, even this may not compile. It's just an illustration of my argument.)

Log in or registerto write something here or to contact authors.