你的位置:首页 > 软件开发 > Java > 集合练习——Map部分

集合练习——Map部分

发布时间:2016-02-06 00:00:10
练习:输入诗的名称查询出诗的内容,当输入exit时,退出程序,“春晓”,“静夜思”,“鹅”。 package CollectionPart;public c ...

练习:

输入诗的名称查询出诗的内容,当输入exit时,退出程序,“春晓”,“静夜思”,“鹅”。

 

package CollectionPart;public class Poetry {    private String title;  private String poet;  private String content;  public String getTitle() {    return title;  }  public void setTitle(String title) {    this.title = title;  }  public String getPoet() {    return poet;  }  public void setPoet(String poet) {    this.poet = poet;  }  public String getContent() {    return content;  }  public void setContent(String content) {    this.content = content;  }  @Override  public String toString() {    return "Poetry [title=" + title + ", poet=" + poet + ", content=" + content + "]";  }  public Poetry(String title, String poet, String content) {    super();    this.title = title;    this.poet = poet;    this.content = content;  }  public Poetry() {    super();  }}

原标题:集合练习——Map部分

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录