What are java beans how different from normal java classes

What are java beans how different from normal java classes ?

OR
What are java beans how different from normal java classes ? Can a normal java class can be a bean ?

Answer :

Java Java Bean
It does follow the rules to become a class It follows the rules of becoming java class and some other simple rules to become Java bean
This cannot work as reusable software component It work as reusable software component
Java is a specification where it follows certain rules defined in java specification. This extends functionality of class and to become bean it must have public no arg constructor, no public instance variable and should have getter and setter

Leave a Reply

Your email address will not be published. Required fields are marked *