JavaBeat Certifications Certifications Kits Articles Interview Questions OCAJP 7 OCPJP 5 OCPJP 6 OCEJWCD 6 SCBCD 5.0 SCEA SCJA

What exactly are Java Beans?

Topic :
Feedback Request New QnA Print Email

Java Beans are components that can be used to assemble a larger Java application. Beans are classes that have properties, and can trigger events.

To define a property, a bean author provides accessor methods, that can get and set the value of a property. A bean tool should inspect the class for methods matching the get/set pattern, and allow you to modify the object's properties.

public class MyFirstBean
{
private String name;

public MyFirstBean()
{
name = new String("MyFirstBean");
}

public String getName()
{
return name;
}

public void setName( String newName )
{
name = newName;
}

}
This is a very simple bean, within minimal functionality. It triggers no events, and has a single property, but does introduce you to the basics of beans

Topic :
Feedback Request New QnA Print Email

All api java java 6.0 java 7.0 jdbc jsp servlet ejb jndi jms ejb 3.0 j2ee jee 5.0 jee 6.0 jsf struts spring Hibernate ajax JBoss Seam netbeans eclipse ant xml maven dojo junit javafx j2me log4j ESB JBoss Apache Quartz scjp mysql oracle gwt openjpa jmx yui google-guice android JBoss scwcd 5.0 scjp 1.5 scjp 1.6 scja scbcd 5.0

javabeat | advertise | about us | contact | useful resources
Copyright (2004 - 2013), JavaBeat