logoalt Hacker News

rybosome • today at 10:27 PM • 1 reply • view on HN

A Bean was a specific type of Java class that only consisted of getters, setters, and plain fields. A data class.

This was from early days in Java, and I think the predominant use case was for code generation. Things like databases, etc. - you'd get generated Bean-style classes.


Replies

WatchDog • today at 10:53 PM

Colloquially and in all of the Java codebases I ever worked on your description of what a bean is is essentially correct, but it's not really the full meaning.

JavaBeans and Enterprise JavaBeans, were both standards that have quite a bit more functionality.

https://en.wikipedia.org/wiki/JavaBeans https://en.wikipedia.org/wiki/Jakarta_Enterprise_Beans