1. Which method must exist in every java application?

A. main

B. paint

C. begin

D. init

Correct Answer : A

2.What's the right way to handle abnormalities in input on java?

A. By handling these problems by providing exception handlers.

B. By writing whileloops to guard against bad input.

C. By using the class FileFilter which gracrfully filters out bad input data.

D. By always specifying the throws clause in every method header where file i/o is performed.

Correct Answer :A

3. The name of a java source file ___?

A. must be the same as the class it defines, respecting case.

B. has no restrictions.

C. must use the extension class.

D. must be the same as the class it defines, ignoring case.

Correct Answer : A

4. A difference between the methods "print" and "println" of the class java.io.printwriter is that __?

A. "print" inserts a new line at the beginning of its output, but "println" does not.

B. "println" appends a new line to the end of its output, but "print" does not.

C. "println" inserts a new line at the beginning of its output, but "print" does not.

D. "print" appends a new line to the end of its output, but println does not.

Correct Answer : B

5. A tool that allows programmers to execute lines of a program one line at a time in order to help locate the source of a program's errors is known as a(n) __?

A. debugger.

B. scope.

C. exception handler.

D. stack trace.

Correct Answer : A

6. Classes from which of the following packages are implicitly imported into every Java program?

A. java.awt

B. java.io

C. java.lang

D. java.util

Correct Answer : C

7. Which of the following statements is(are) true about the use of an asterisk(*) in a java import statement?

i.It does not incur run-time overhead.

ii. It can be used to import multiple packages with a single statement.

iii. It can be used to import multiple classes with a single statement.

A. i and iii only

B. iii only

C. i only

D. i, ii and iii

Correct Answer : A

8. Which of the follwing is the string concatenation operator in java?

A. +

B. ^

C. &

D. ++

Correct Answer : A

9. What will be output when the following java program segment is executed?

int x = 5;int y = 2;System.out.println(x + y);

A. 7

B. 5 2

C. 5 + 2

D. 52

Correct Answer : A

10. What will be output caused by the execution of the following java program segment?

String name = "elvis";System.out.print(name + "was here");

A. name + was here

B. elvis was here

C. name was here

D. elviswas here

Correct Answer : D

(部分题目来源于网络,如有侵权,请联系文章作者删除。)

Java基础知识英文选择题1——Basic of Java Programs.相关推荐

  1. Java基础知识(重点)总结(Java学习方法、系统学习路线)

    参考:https://www.cnblogs.com/schiller-hu/p/10662429.html Java自学网:https://www.51zxw.net/list.aspx?cid=3 ...

  2. Java基础知识复习(一)

    Java基础知识复习(一) 目录 Java简介 命名规则 八种基本的数据类型 字面量 类型转换 变量的形态 逻辑运算符 位运算 移位运算 习题知识点 目录 Java简介 Java是由Sun公司在199 ...

  3. Java基础知识(四) 基本类型与运算

    Java基础知识 基本类型与运算 1. Java提供了哪些基本数据类型 2. 什么是不可变类 3. 值传递与引用传递的区别 4. Math类中的round.ceil和floor方法的功能各是什么 5. ...

  4. 【转】Java基础知识整理

    本博文内容参考相关博客以及<Java编程思想>整理而成,如有侵权,请联系博主. 转载请注明出处:http://www.cnblogs.com/BYRans/ PDF版下载链接:<Ja ...

  5. 【转】java基础知识总结

    Java基础知识总结 本博文内容参考相关博客以及<Java编程思想>整理而成,如有侵权,请联系博主. 转载请注明出处:http://www.cnblogs.com/BYRans/ PDF版 ...

  6. Java基础知识(七) 输入输出流

    Java基础知识 输入输出流 1. Java IO流的实现机制是什么 2. 管理文件和目录的类是什么 3. Java Socket是什么 4. Java NIO是什么 5. 什么是Java序列化 6. ...

  7. java(5)---Java基础知识大全

    Java基础知识大全 一.基础知识:  1.JVM.JRE和JDK的区别:  JVM(Java Virtual Machine):java虚拟机,用于保证java的跨平台的特性.  java语言是跨平 ...

  8. java基础知识之初识java

    java基础知识之初识java JAVA基础课后总结 一 1.计算机程序 定义:程序(Program)是为实现特定目标或解决特定问题而用计算机语言编写的命令序列的集合. 2.指令 定义:指令就是指示机 ...

  9. java基础知识学习小总结(一)

    此文转载自:https://blog.csdn.net/weixin_44734093/article/details/109715246 什么是java Java是一门面向对象编程语言,不仅吸收了C ...

最新文章

  1. [转载] 人类智能PK人工智能——06 计算智能
  2. Python机器学习实践:决策树判别汽车金融违约用户
  3. js实现modbus_nodejs中使用modbus-serial库创建Modbus TCP读取设备的数据
  4. 使用模板来解决接口继承问题
  5. 大数据笔记(十三)——常见的NoSQL数据库之HBase数据库(A)
  6. HTML5使用Div标签来实现表格
  7. linux如何打开dhcp服务,怎么开启DHCP服务器啊
  8. ArcGIS 城市生活区用地适宜性评价(一)
  9. 个人经验分享:AD绘制PCB(入门教程)
  10. 行政区村界线_中国各省界线是如何形成的?古代行政区划界原则
  11. 基于74系列芯片的红绿灯设计
  12. matlab二阶系统绘制bode图,二阶系统bode图
  13. Office—OneNote快捷键操作
  14. PowerDesigner使用教程 —— 概念数据模型(CDM模型)
  15. Word文件批量查找替换字符串
  16. 友善串口工具 电子秤_Serial Port Utility
  17. Nginx配置虚拟主机
  18. Ubuntu 屏幕颜色校准
  19. java 银行卡支付_Java学习:用接口简单实现银行卡系统
  20. 量化交易——布林带策略

热门文章

  1. 一叶知秋,一个 LED 就能入门 Linux 内核
  2. html width 100 无效,html css 样式中100%width 仍有白边解决办法
  3. MultiSigWallet实例
  4. 关于扩展IP地址空间的几个方案的探讨
  5. 使用ip小魔棒让外部网络访问内网中的资源
  6. maya 白天室内灯光_Maya课时:白天的灯光构建视频教程_翼狐网
  7. 趣图 | 程序员的白天 vs 夜晚?
  8. 性能追击:万字长文30+图揭秘8大主流服务器程序线程模型 | Node.js,Apache,Nginx,Netty,Redis,Tomcat,MySQL,Zuul
  9. 照片纸特效多画面滚动动画展示PR视频剪辑模板
  10. 计算机科学与昆虫,基于视觉的昆虫物种识别算法研究