【发布时间】:2016-01-31 10:53:31
【问题描述】:
我想将方法 getvalue() 的返回值更改为字符串“消防员”,我从 main 方法尝试过但没有成功。 期待一些解决方案。
public class Summ2 {
private String getValue() {
return "TUHH";
}
public static void main(String[] args) {
Summ2 GO = new Summ2();
assert GO.getValue() == "firefighter";
System.out.println(GO.getValue());
}
}
【问题讨论】:
-
投票结束作为错字/对未来的读者没有价值
标签: java methods return-value