import java.io.Serializable;

        // Keep a record of a Web page's URL and a title for it.
        // The title is not necessarily the page's HTML title but
        // could be user defined. However, a URL string may not
        // be altered once set.
class Bookmark implements Serializable {
    public Bookmark(String url,String title){
        this.url = url;
        setTitle(title);
    }

    public String getUrl(){
        return url;
    }

    public String getTitle(){
        return title;
    }

        // Allow external changes to the title.
    public void setTitle(String t){
        if(t != null){
            title = t;
        }
    }

    private String title;
    private final String url;
}
