Listing 1. SimpleBean.java
package il.co.lerner;
import java.util.*;
import java.lang.*;
import java.sql.*;
public class SimpleBean implements
private int userID;
// ----------------------------------------------
// Constructor
public SimpleBean () {
// Set our field
userID = 0;
}
// ----------------------------------------------
// Retrieve userID property
public int getUserID()
{
return userID;
}
// ----------------------------------------------
// Change the userID property
public void setUserID (int newID)
{
userID = newID;
return;
}
}
Copyright © 1994 - 2019 Linux Journal. All rights reserved.