注意:此页面搜索的是所有试题
以下程序的输出结果为_____。
public class Tom {
private float weight;
private static String name;

public void setWeight(float weight) {
this.weight = weight;
}

private void out() {
System.out.println(name + "体重:" + weight + "斤");
}

public static void main(String[] args) {
Tom.name = "汤姆猫";
Tom cat = new Tom();
cat.setWeight(20);
cat.out();
}
}

参考答案