文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 《Java语言程序设计:基础篇》课后复习题答案-第五章
侵权投诉

《Java语言程序设计:基础篇》课后复习题答案-第五章

《Java语言程序设计:基础篇》课后复习题答案

publicstaticchargetUpperCase(charletter)

8.

Line2:method1isnotdefinedcorrectly.Itdoesnothaveareturntypeorvoid.Line2:typeintshouldbedeclaredforparameterm.

Line7:parametertypefornshouldbedoubletomatchmethod2(3.4).

Line11:if(n<0)shouldberemovedinmethod,otherwiseacompileerroris

reported.9.

publicclassTest{

publicstaticdoublexMethod(doublei,doublej){while(i<j){j--;}}}10.11.

Youpassactualparametersbypassingtherighttypeofvalueintherightorder.Theactualparametercanhavethesamenameasitsformalparameter."Passbyvalue"istopassacopyofthevaluetothemethod.

(A)Theoutputoftheprogramis0,becausethevariablemaxisnotchangedbyinvokingthemethodmax.(B)

224248248162481632248163264(C)

Beforethecall,variabletimesis3n=3

WelcometoJava!n=2

WelcometoJava!n=1

WelcometoJava!

Afterthecall,variabletimesis3(D)

1

returnj;

上一页第2页

TOP相关主题

你可能喜欢

  • java基础测试题
  • java程序设计
  • java考试题
  • java模拟题
  • java应用程序
  • JAVA基础教程

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email