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. 排序算法 时间复杂度+空间复杂度 总结
  2. 枚举中关于toRaw()和fromRaw(3)编译出错
  3. java 判断题_Java面试题及解析(判断题)
  4. 获取this_带你彻底弄清JavaScript的关键字this
  5. react 动态路 嵌套动子路由_react 路由动态加载组件,实现按需加载
  6. [acm]HDOJ 1200 To and Fro
  7. 2016全国计算机二级题,2016全国计算机二级考生试题及答案
  8. ensp综合组网实验_关于实验室温度控制的那些事
  9. 十大笔记本品牌型号命名规则【联想】
  10. 利用BI搭建零售业数据信息平台
  11. 王者荣耀 兵线刷新时间计数器 || 程咬金 水晶断兵线时间
  12. PHP笔记03-数组1
  13. sld样式文件demo
  14. 编写SQL语句,从Customers表中检索所有的ID(cust_id)
  15. 【CSS】静态螺纹进度条和静态流程布局
  16. python导出结果_Python连接Oracle数据查询导出结果
  17. AC/DC 反激 (Flyback) 控制器
  18. K means 图片压缩
  19. ant design pro of vue导航菜单图标引入阿里巴巴矢量库iconfont方法
  20. 初次使用SpiderMonkey

热门文章

  1. attention方式的算法
  2. 三菱Q系列PLC(内置以太网)与IFIX驱动IGS通讯测试 - TCPIP或UDP
  3. 解决com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
  4. python加速度算位移_基于Labview的加速度两次积分求位移
  5. 在discuz论坛增加背景音乐代码
  6. 09组团队项目-Alpha冲刺-6/6
  7. hosts文件恢复如初方法
  8. android 微信 https 证书,微信https未授权证书究竟是什么意思
  9. 拖拽图片在Label上显示
  10. html5文字跳动特效,jQuery网页文字跳动动画特效