Content deleted Content added
→History?: new section |
→Incorrect: new section |
||
Line 94:
When were JavaBeans invented? Have there been any major modifications to the concept since then? [[User:RenniePet|RenniePet]] ([[User talk:RenniePet|talk]]) 02:25, 23 July 2013 (UTC)
== Incorrect ==
The first sentence states "JavaBeans are classes that encapsulate many objects into a single object (the bean)." I believe this is a really bad thing to say for three reasons:
There is no need for multiple objects to be involved in a JavaBean. A perfectly good example (though of little use) is
import java.io.Serializable;
public class JBExample implements Serializable {
public JBExample(){}
}
Also, though a class may "encapsulate many objects," it is usually the instances of classes one is more interested in. The encapsulation (or not) of objects directly in a class is irrelevant for being a bean.
Finally, if the actual intent was to speak of instances of a class: It is not only unnecessary to encapsulate many objects, it is also not sufficient to do so. Java objects may well encapsulate many other objects, but they need not be an instance of a JavaBean class to do so.
[[User:Randallbsmith|Randallbsmith]] ([[User talk:Randallbsmith|talk]]) 19:02, 10 March 2016 (UTC)
|