Re: Java Bean Question
Chris ( Val ) wrote:
On Oct 10, 8:04 am, Lew <l...@lewscanon.com> wrote:
Yes, again I agree, but their example code does show an
explicit one, and in seems that NetBeans automatically
adds it there for you.
I'm not certain that all versions of NetBeans have all templates set up to do
In any event, if you don't want NetBeans to insert an explicit constructor,
remove it from the template.
Nothing about being explicit.
Well, that statement is not that cut and dry, to be honest.
The way it is worded *seems* to suggest otherwise. It might
have been better understood had it used the term:
"Default constructor" means the no-arg constructor in Java. They are exact
synonyms. If you understand it with one term, then you understand it with
both, otherwise you don't understand it.
"Seems" how? Provide evidence. Java has a rule that there is a default
constructor provided under certain circumstances; following an instruction to
provide such a constructor means that you might choose to let it happen
automagically. That is a choice you make given understanding of the language.
By reading that statement, and having an understanding
that initialising objects during instantiation is a
good object orientated practice to employ via various
constructor overloads, it seemed reasonable to think
that you will always need to explicitly provide the
Unless you know that you can provide it implicitly, which is a very basic rule
I hope that you can see why I have been confused over
Sure, but don't hang on to the confusion. You've had a clarification, now let
go of your personal history and move on.
There is so much information on Java, so many acronyms,
so many deprecated features with so many versions of
java, thus different ways of approaching a problem, that
it is difficult to get a grasp of what is core and what
is add-on, etc...
That's why they pay us the big bucks. If it was easy, everyone would do it.