what is java bean?where can we use it?

Answer Posted / namita

Java bean is simply a java class which has getter and
setter methods.
setter methods are used to set the data.
getter methods are used to to get the data.

Java beans are used to encapsulate objects in a single java
bean so that the bean can be used or passed in other
classes.

Like in our jsp we can use this bean by using <%jspusebean>
tag.

Is This Answer Correct ?    82 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write custom exception in java?

595


What is the purpose of garbage collection in java, and when is it used?

556


What are the characteristics of Final,Finally and Finalize keywords.

692


Why do we need hashset in java?

487


What are the fileinputstream and fileoutputstream?

565






Difference between ‘is-a’ and ‘has-a’ relationship in java?

533


Can we sort hashset in java?

620


What is generic type?

564


What is default switch case? Give example.

572


What are memory tables?

602


How many days will it take to learn java?

506


Can variables be used in java without initialization?

547


Can string be considered as a keyword?

560


What is a copy constructor in java?

572


What is += mean in java?

536