Two Laptop Bag
The moose likes EJB and other Java EE Technologies and the fly likes What the hell is a JAVA BEAN??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What the hell is a JAVA BEAN???" Watch "What the hell is a JAVA BEAN???" New topic

What the hell is a JAVA BEAN???

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329

Sorry about the foul language in the subject but I am very frustrated. No matter how much I read I can't seem to get a good definition of what a java bean is. The only thing that I know is that a java bean is some kind of class written to some specification but it's not clear on how to determine whether a class can be considered a bean or not. I'm starting to feel like a real idiot. If there's anyone out there who can give me a definition of what a Java bean is, I would really appreciate it.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

I think you can find a precise definition at - but essentially, a JavaBean is a class that has a no-argument constructor and properties that can be set and retrieved via setXxxx() and getXxxx() methods given a property named "xxxx" - please note the change in capitalization, a process known as "introspection" works in conjunction with this convention.
A JavaBean may or may not be associated with a GUI element, depending on what it's intended to be used for. An ENTERPRISE JavaBean (EJB) carries the whole thing to a much higher degree of complexity, and there are several good books written on that topic.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: What the hell is a JAVA BEAN???
It's not a secret anymore!