23,405
社区成员
发帖
与我相关
我的任务
分享
public Class Person(){
private String name ;
public Person(String name){
this.name = name ;
}
public void setName(String name){
this.name = name ;
}
public String getName(){
return name;
}
}
public Class LoveLetter(){
public static void doLoveYou(Person me ,Person you){
System.out.print(me.getName() +" love " + you.getName());
}
public static void main(String[] args){
while(true){
doLoveYou(new Person("king"),new Person("monitor"));
}
}
}