王老师:19139051760(微信同号)  13333709510
联大   青书学堂   文才   和学   现代兴业   安徽教育在线   超星   弘成   广东开放大学   国家开放大学   上海开放大学   含弘慕课 

教育服务

成人高校
成考录取分数线
我要提升学历
提升学历的理由:
升职加薪、积分落户、考研、公务员考试、子女入学、出国留学


成人高考报名入口

当前位置: 首页 > 江开系统 > 青岛科技大学> 江苏开放大学JAVA程序设计形成性考核作业1
 

输入试题:
本题添加时间:2023/10/10 13:28:00
圆梦客服:王老师  19139051760(微信同号)  19139051760(微信同号)
以下程序的输出结果为_____。
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斤

出自 江苏开放大学JAVA程序设计形成性考核作业1  江开系统

青岛科技大学

更多试题>>>>
1、以下程序的输出结果为_____。 public class Course { private String cNumber; private String cName; private int cUnit; publi
2、以下程序的输出结果为________。 public class Person { String name; int age; public Person(String name, int age) { this.n
3、阅读以下程序,写出输出结果。 class Animal { Animal() { System.out.print ("Animal "); } } public class Dog extends An
4、以下程序段的输出结果为 5 6 7 8 9 。 public class TestArray { public static void main(String args[ ]){ i
5、以下程序的输出结果为 。 class StringTest1 { public static void main(String[] args) { String s1="hello"; Strin


提升学历-成人高考报名入口 提升学历-成人高考院校名单