题目:阅读以下程序,给出程序的输出结果。publicclassTom {privatefloatweight;privatestaticString name;publicvoidsetWeight(floatweight) {this.weight= weight;}privatevoidout() {System.out.println(name+ "体重:"+ weight+ "斤");}publicstaticvoidmain(String[] args) {Tom.name= "汤姆猫";Tom cat = newTom();cat.setWeight(20);cat.out();}}
答案:
<查看本题扣3积分>
汤姆猫体重:20斤..... 查看答案
问题答案不对?抱歉,搜索引擎优化导致页面变化,请尝试站内搜索,远程教育试题库