//NameBean.java
package myBean;

public class NameBean {
	private String name = "nobody";
	public NameBean() {
	}

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String firstName() {
		int index = name.indexOf(" ");
		if(index == -1)
			return name;
		else
			return name.substring(0, index);
	}
}