解释一下两个reutrn的意思 5
publicclassMobilPhone{publicStringbrand;publicMobilPhone(){this.brand="诺基亚";}publicMo...
public class MobilPhone{
public String brand;
public MobilPhone(){
this.brand="诺基亚";
}
public MobilPhone(String bra){
this.brand=bra;
}
public String Buy(){
return "没发工资,买一个" + brand + "牌子的手机吧!";
}
public String Buy(String reason){
return reason + ",快买一个" + brand + "牌子的手机吧!";
}
} 展开
public String brand;
public MobilPhone(){
this.brand="诺基亚";
}
public MobilPhone(String bra){
this.brand=bra;
}
public String Buy(){
return "没发工资,买一个" + brand + "牌子的手机吧!";
}
public String Buy(String reason){
return reason + ",快买一个" + brand + "牌子的手机吧!";
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询