player.java

来自「一些很有用的spring的书籍」· Java 代码 · 共 61 行

JAVA
61
字号
/*
package com.apress.springbook.chapter02;

public class Player {
  private String fullName;
  private int ranking;

  public Player(String fullName, int ranking) {
    if (fullName == null || fullName.length() == 0) {
      throw new IllegalArgumentException("Full name is required!");
    }
    this.fullName = fullName;
    this.ranking = ranking;
  }

  public void setFullName(String fullName) {
    this.fullName = fullName;
  }

  public void setRanking(int ranking) {
    this.ranking = ranking;
  }


  public String getFullName() {
    return this.fullName;
  }

  public int getRanking() {
    return this.ranking;
  }

}
*/

package com.apress.springbook.chapter02;

public class Player {
   private String fullName;
   private int ranking;

   public Player(String fullName) {
      if (fullName == null || fullName.length() == 0) {
         throw new IllegalArgumentException("Full name is required!");
      }
      this.fullName = fullName;
   }

   public String getFullName() {
      return this.fullName;
   }

   public void setRanking(int ranking) {
      this.ranking = ranking;
   }

   public int getRanking() {
      return this.ranking;
   }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?