随笔分类 -  Java语言程序设计基础

摘要:异常处理 1)What is displayed on the console when running the following program? class Test { public static void main (String[ ] args) { try { System.out.p 阅读全文
posted @ 2019-10-16 11:32 王陸 阅读(2575) 评论(0) 推荐(2) 编辑
摘要:1)Analyze the following code: public class Test { public static void main(String[ ] args) { B b = new B(); b.m(5); System.out.println("i is " + b.i); 阅读全文
posted @ 2019-10-14 17:28 王陸 阅读(4559) 评论(0) 推荐(1) 编辑
摘要:1)You can declare two variables with the same name in ________. 1) _______ A)a method one as a formal parameter and the other as a local variable B)di 阅读全文
posted @ 2019-10-14 16:31 王陸 阅读(3587) 评论(0) 推荐(2) 编辑
摘要:今天课堂测试做了几道String的练习题,做完直接心态爆炸...... 整理自下面两篇博客: https://www.cnblogs.com/marsitman/p/11248001.html https://www.cnblogs.com/aspirant/p/9193112.html 首先先来看 阅读全文
posted @ 2019-10-11 18:51 王陸 阅读(3014) 评论(1) 推荐(1) 编辑
摘要:1)Which code fragment would correctly identify the number of arguments passed via the command line to a Java application, excluding the name of the cl 阅读全文
posted @ 2019-10-11 17:55 王陸 阅读(4158) 评论(0) 推荐(4) 编辑
摘要:1)________ represents an entity(实体) in the real world that can be distinctly identified. 1) _______ A)A data field B) An object C)A method D) A class 阅读全文
posted @ 2019-09-28 16:01 王陸 阅读(5903) 评论(0) 推荐(4) 编辑
摘要:1)Which of the following statements are correct? 1) _______ A)char[ ][ ] charArray = {{'a', 'b'}, {'c', 'd'}}; B)char[2][2] charArray = {{'a', 'b'}, { 阅读全文
posted @ 2019-09-26 20:52 王陸 阅读(1090) 评论(0) 推荐(0) 编辑
摘要:1)What is the representation of the third element in an array called a? 1) _______ A)a(3) B) a(2) C) a[2] D) a[3] 2)If you declare an array double[ ] 阅读全文
posted @ 2019-09-24 21:46 王陸 阅读(2304) 评论(0) 推荐(2) 编辑
摘要:1)Suppose your method does not return any value, which of the following keywords can be used as a return type? A)void B)public C)int D)double E)None o 阅读全文
posted @ 2019-09-23 19:38 王陸 阅读(2447) 评论(0) 推荐(0) 编辑
摘要:1)How many times will the following code print "Welcome to Java"? A)8 B) 9 C) 0 D) 11 E) 10 2)Analyze the following code. (Choose all that apply.) A)c 阅读全文
posted @ 2019-09-19 15:18 王陸 阅读(1925) 评论(0) 推荐(0) 编辑
摘要:1)The "less than or equal to" comparison operator in Java is ________. A)<< B) != C) =< D) <= E) < 2)The equal comparison operator in Java is ________ 阅读全文
posted @ 2019-09-18 18:41 王陸 阅读(2592) 评论(0) 推荐(0) 编辑
摘要:1)Suppose a Scanner object is created as follows: Scanner input = new Scanner(System.in); What method do you use to read an int value? A) input.nextIn 阅读全文
posted @ 2019-09-18 11:31 王陸 阅读(4259) 评论(0) 推荐(1) 编辑
摘要:1)________ is the physical aspect of the computer that can be seen. A)Hardware B) Operating system C)Application program D) Software 2)________ is the 阅读全文
posted @ 2019-09-18 10:01 王陸 阅读(2750) 评论(4) 推荐(4) 编辑
摘要:Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the 阅读全文
posted @ 2018-10-28 12:41 王陸 阅读(377) 评论(0) 推荐(1) 编辑
摘要:Java在大数的处理上比C确实流氓多了,在这里我整理一些有关Java的一些基础知识和模板,以便之后学习。 内容大多摘自两位师哥,这里给出原文的链接 爱国师哥https://www.cnblogs.com/aiguona/p/9133554.html --福星师哥https://blog.csdn.n 阅读全文
posted @ 2018-07-27 14:36 王陸 阅读(13187) 评论(3) 推荐(5) 编辑