问题
填空题
以下程序的输出结果为______。
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______;
答案
参考答案:汤姆猫体重:20.0斤