Explain the difference between, Java Class and Bean?

Answer Posted / almeja del río

from:
http://forums.sun.com/thread.jspa?threadID=526214


Java Beans follow the Bean conventions:

(1) Default, no-arg ctor,
(2) Serializable,
(3) getX()/setX() or isX()/setX() naming convention for
read/write access to private data member X,
(4) Can use java.bean.PropertyChangeEvent to notify
interested parties when values change.
(5) Can use java.bean.PropertyChangeListener to register for
notification when a particular property changes.

"Normal" Java classes aren't required to follow any of these
conventions.

There's a great
[url=http://java.sun.com/docs/books/tutorial/javabeans/]tutorial[/url]
on Java Beans from Sun.

Is This Answer Correct ?    12 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to have threading in ejb?

759


How does the server decide which beans to passivate and activate?

780


What is ejb and its architecture?

700


How is consistency maintained by Stateful Session through transaction updates ?

873


Define EAR, WAR and JAR ?

805


What is stateless and stateful?

741


What do you understand by session facade?

747


What is the advantage of using entity bean for database operations, over directly using jdbc api to do database operations? When would I use one over the other?

860


What is ejb and its types?

714


Define Clone?

790


What is @enableautoconfiguration?

765


Is having static initializer blocks legal in ejb?

745


What does ejb stand for?

824


What are ejb containers?

749


Explain the architectural relationship between JavaBeans and JTA?

2638