Saturday, January 23, 2010

Java Default Constructor Question

In class today it occurred to me that since Java will always set new variables to a default empty (NULL) state, then there may be no need to have a default constructor unless you want the default to be some value other than NULL.

If a programmer only needs default settings, then is it possible to avoid writing the default constructor all together, even if you have other constructors that receive arguments?

1 comment:

  1. It's good to see that you continue to use your blog for other subjects too.

    ReplyDelete