Search Header Logo

JAVA_2

Authored by Shiwen Zhang

Computers

University

Used 2+ times

JAVA_2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

在Java中使用switch语句时,若忘记在case语句后写break,会发生什么?

编译错误

运行时错误

没有任何影响

发生“穿透”

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Java中的`continue`关键字有什么作用?

终止循环

跳过当前循环的剩余部分并开始下一次迭代

退出当前方法

无条件地执行循环的下一次迭代

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

在Java中声明一个枚举类表示星期的正确方式是什么?

class Day { MONDAY, TUESDAY, WEDNESDAY, ... }

enum Day { MONDAY, TUESDAY, WEDNESDAY, ... }

interface Day { MONDAY, TUESDAY, WEDNESDAY, ... }

struct Day { MONDAY, TUESDAY, WEDNESDAY, ... }

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

表达式"(6 > 3) && (5 < 2)"的值是( )

true

false

编译错误

运行时错误

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Java中,break语句可用于跳出当前循环。

true

false

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

在Java中,do-while循环至少执行一次循环体。

true

false

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Java中,逻辑运算符"&&"和"||"都是短路运算符。

true

false

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers