?? club.java
字號:
package ope.football;
/**
* The class <CODE>Club</CODE> represents football clubs in
* a match statistics system. Only some very basic information
* for each club is recorded. A club object is immutable once created.
*/
public class Club {
private String name; // fixed value
private int yearFormed; // fixed value
/**
* Creates a new club with the given basic information.
*
* @param name the name of the club
* @param yearFormed the year the club was formed
*/
public Club( String name, int yearFormed) {
this.name = name;
this.yearFormed = yearFormed;
}
/**
* Returns the name of the club.
*
* @return club name
*/
public String getName() {
return this.name;
}
/**
* Returns the year the club was formed.
*
* @return formation year
*/
public int getYearFormed() {
return this.yearFormed;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -