我是靠谱客的博主 顺利向日葵,最近开发中收集的这篇文章主要介绍Java基础知识英文选择题1——Basic of Java Programs.,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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.的全部内容,希望文章能够帮你解决Java基础知识英文选择题1——Basic of Java Programs.所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(45)

评论列表共有 0 条评论

立即
投稿
返回
顶部