1 / 50
文档名称:

java考试题带答案.docx

格式:docx   大小:60KB   页数:50
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

java考试题带答案.docx

上传人:酒酿小樱桃 2017/5/2 文件大小:60 KB

下载得到文件列表

java考试题带答案.docx

相关文档

文档介绍

文档介绍:第一章复习题 Source program means the original program written ina high-level language. piler isa program that translates source program into executable code. Developed bya team led by James Gosling at Sun Microsystems in 1991. Originally called Oak, it became Java in 1995 when it was redesigned for developing applications. Keywords have specific meaning to piler and cannot be used for other purposes in the program such as variables or method names. Examples of keywords are class, static, and void. Java source code is case sensitive. Java keywords are always in lowercase. The source file extension is .java and the bytecode file extension is .class. public class e { public static void main(String[] args) { ( "morning" ); ( "afternoon" ); }} Line 2. Main should be main. Line 2. static is missing. Line 3: e to Java! should be enclosed inside double quotation marks. Line 5: The last ) should be }. javac is the mand pile a program. java is the mand to run a program. Java interpreter cannot find the .class file. Make sure you placed the .class in the right place, and invoked mand with appropriate package name. The class does not have a main method, or the signature of the main method is incorrect. 编程题 1-6 public class Exercise1_6 { public static void main(String[] args) { (1 +2+3+4+5+6+7+8+ 9); }} 1-7 public class Exercise1_7 { public static void main(String[] args) { (4 * (1- /3+ /5- /7+ /9- / 11+ / 13)); }} 第二章复习题 Valid identifiers: applet, Applet, $4, apps, x, y, radius Invalid identifiers: a++, --a, 4#R, #44, class, public, int Keywords: class, public, int Line 2: Missing static for the main method. Line 2: string should be String. Line 3:i is defined but not initialized before it is used in Line 5. Line 4:k is an int, cannot assign a double value to k. Lines 7-8: The string cannot be broken into two lines. bc -2

最近更新

2026年内江卫生与健康职业学院单招职业技能测.. 44页

2026年南昌大学附属口腔医院高层次人才招聘考.. 45页

2025年巧家县招教考试备考题库含答案解析(必.. 31页

2026年国开法律专题形考作业4考试题库及参考答.. 45页

2026年国开电大基础写作形考题库(名师系列).. 37页

2026年国开电大外国文学形考题库附完整答案(.. 40页

2025年盐城工业职业技术学院单招职业倾向性测.. 43页

2026年大学工程学院C语言考试真题ab卷 13页

2026年宁夏吴忠市单招职业适应性考试题库附答.. 45页

2026年安徽电子信息职业技术学院单招职业技能.. 44页

2026年宜春幼儿师范高等专科学校单招综合素质.. 45页

2026年山西华澳商贸职业学院单招职业技能考试.. 45页

2026年一级造价师考试题库300道附完整答案【易.. 100页

2026年乐理考试题库及一套完整答案 28页

2026年保安资格考试题(word) 15页

2026年党规学习考试题库一套 18页

2026年江苏省无锡市单招职业适应性考试题库附.. 44页

2026年注册建筑师考试题库200道附参考答案(达.. 85页

2026年消毒技术题库【有一套】 39页

2026年算法与数据结构—C语言描述精编答案 13页

2026年自考专业(营销)考试题库2000道及完整答.. 82页

2026年起重机司机考试题库200道及参考答案(新.. 76页

2026年巡视党建知识测试题精选 25页

2026年广西现代职业技术学院单招职业技能测试.. 44页

2026年征兵的心理测试题库附答案 40页

2026年江西交通职业技术学院单招职业倾向性考.. 37页

2025年安徽邮电职业技术学院单招职业技能测试.. 66页

2024年南京信息职业技术学院单招职业技能测试.. 78页

CFG群桩基础土方开挖施工方案 6页

二年级(上册)数学-认识钟表练习试题合集 20页