java - Why did it become a convention to create a non-arg constructor in a javabean? -
java - Why did it become a convention to create a non-arg constructor in a javabean? -
i know
a javabean standard
all properties private (use getters/setters) public no-argument constructor implements serializable. source
we know not required provide non argument constructor in class, because if have not specified constructor in our class java compiler create non argument constructor. if why programmers wanted create non argument constructor in javabean convention.
you confusing requirements on javabean class requirements on source code. no part of javabeans specification deals how source code must like, strictly resulting class.
so yes, each javabeans class must provide nullary constructor, , how accomplish source code (or bytecode generator) you.
java javabeans
Comments
Post a Comment