Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the difference between, Java Class and Bean?

Answers were Sorted based on User's Feedback



Explain the difference between, Java Class and Bean?..

Answer / john

A Java class is meant to carry out the different database
operations like retrtieveing data, inserting data and
updating data.

The EJB has the business logic within it. the EJB decides
what the business requires and carries out different
transactions. It makes use of the Java class to interact
with the database.

The Java Bean is simple java class which is contains Getters
and Setters. They are just meant to modify the values of the
variables. They neither contain any business logic nor do
they interact with the database.

Generaly a Java Class would retrieve some data and this data
is assigned to variables using the Setter method of the Java
Bean. If we want to retrieve the value of the cariable again
we use a Getter method

Is This Answer Correct ?    22 Yes 16 No

Explain the difference between, Java Class and Bean?..

Answer / nagarjuna

Java class and Bean class both r similar but in Bean class contain Setters and Getter methods

Is This Answer Correct ?    7 Yes 4 No

Explain the difference between, Java Class and Bean?..

Answer / 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

More EJB Interview Questions

How does ejb work in java?

0 Answers  


What is the procedure of ejb container to handle exceptions?

0 Answers  


Which is the only method defined in the javax.ejb.handle interface?

0 Answers  


How to invoke ejb from java client?

0 Answers  


What are types in SessionBeans?

1 Answers  


What are the benefits of ejb?

0 Answers  


can we have static initializer blocks in EJB?

1 Answers   Reliance,


How does ejb invocation take place?

0 Answers  


What are the properties in Beans?

1 Answers  


Why is ejb used?

0 Answers  


Using Container managed entity bean, how an entity bean can be created?

1 Answers  


What is ejb in java with example?

0 Answers  


Categories