public class Music {rivate String name;private String title;
private String director;private String type;private long time;public String getName() { return name;}
public void setName(String name) {this.name = name;}public String getTitle() { return title;} public void setTitle(String title) {
this.title = title;}public String getDirector() {return director;}public void setDirector(String director) { this.director = director;}public String getType() {return type;
}public void setType(String type) {this.type = type; }public long getTime() {return time; } public void setTime(long time) {this.time = time;}
public Music(String name,String title, String director, String type, long time) {super(); this.name = name;
this.title = title;this.director = director;this.type = type;this.time = time;}public Music(){super();}public void sb() {
System.out.println(name+" "+title+" "+director+" "+type+" "+time);}}
听说这样写代码看着头疼,不知道是不是真的。
|
|