-3
public String toString() {
return " Recipient:"+ this.toString(this.getRecipient()) +
" CC:"+ this.toString
(
if(this.getCC()==null)
{
getCC() = "";
}
) +
" Subject:"+this.getSubject() +
" Body:"+ this.getBody() +
" files:"+ this.getFiles();
}
我有此错误:作业的左侧必须是变量是否必要?
getCC()= “”; < ---------这里。
您知道为什么会发生这种情况? 在此先感谢
您不能将表达式分配给方法调用。 – Eran
嗯,因为“作业的左侧必须是一个变量” –
你也不能在这样的另一个表达式中使用'if'语句......也许你正在寻找有条件的'::'操作符? –