Professional Documents
Culture Documents
A Java bean is a Java class that has private member variables, public getter and setter
methods, and a zero-argument, public constructor (supplied automatically by the
compiler). To create a Java bean, follow these seven steps.
1. Open your text editor and create a new file that will contain the Java bean source.
Type in the following Java statements:
6. Type in the command to compile the Java application to instantiate the Java bean
and hit Enter.
7. You are ready to test your Java program. Type in the command to run the Java
runtime launcher and hit Enter. Observe the data from your Java bean.