- A building block to execute the business logic.
- Types
- Entity beans
- Enterprise beans
- Message driven Beans
- Entity beans
- Enterprise beans use the databases if required
- The most important benefit of the enmity bean is that it doesn't need any code for JDBC connection API EJB container itself handles the same.
- If we have a need to use session bean to use the database we need to implement the JDBC connection code.
Encapsulation: Hiding the data/methods inside the object is called the Encapsulation. In Structured programming when u want to have a variable having accessible by some part and not by other part u don't have a mechanism to achieve the same. Encapsulation provides the same mechanism, if a class or a function wants to access then it should access those variables and functions from the references of the class i.e. objects. Inheritance Inheritance enables you to create a class that is similar to a previously defined class, but one that still has some of its own properties. Polymorphism The last major feature of object-oriented programming is polymorphism. By using polymorphism, you can create new objects that perform the same functions as the base object but which perform one or more of these functions in a different way. For example, you may have a shape object that draws a circle on the screen. By using polymorphism, you can create a shape object that draws a rectangle instead...