Search Header Logo

Day 2 - C1 summary

Authored by An Bình

Computers

Professional Development

Used 3+ times

Day 2 - C1 summary
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 SELECT QUESTION

1 min • 10 pts

Media Image

Which answer options represent the order in which the following statements can be assembled into a program that will compile successfully? (Choose all that apply.)

X, Y, Z

Z, Y, X

Y, X

Z, X

X, Z

2.

MULTIPLE SELECT QUESTION

1 min • 10 pts

Media Image

Which of the following are true? (Choose all that apply.)

Bunny is a class.

bun is a class

Bunny is a reference to an object.

bun is a reference to an object.

The main() method doesn’t run because the parameter nameis incorrect

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

Suppose we have the following class in the file /my/directory/named/A/Bird.java. Which of the answer options replaces "INSERT CODE HERE" when added independently if we compile from /my/directory?

package my.directory.named.a;

package my.directory.named.A;

package named.a;

package named.A;

package A;

4.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image

What does the following code output when run as java Duck Duck Goose

Duck Goose

Duck ArrayIndexOutOfBoundsException

Goose

Goose ArrayIndexOutOfBoundsException

None of the above

5.

MULTIPLE SELECT QUESTION

1 min • 10 pts

Which of the following are true statements about Java? (Choose all that apply.)

Bug-free code is guaranteed.

Deprecated features are never removed.

Multithreaded code is allowed.

Security is a design goal

All features in C++ are kept

6.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Which of the following are legal entry point methods that can be run from the command line?

private static void main(String[] args)

public static final main(String[] args)

public void main(String[] args)

public static void test(String[] args)

public static void main(String[] args)

7.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image

Given the following class, which of the following calls print out Blue Jay

java BirdDisplay Sparrow Blue Jay

java BirdDisplay Sparrow "Blue Jay"

java BirdDisplay Blue Jay Sparrow

java BirdDisplay "Blue Jay" Sparrow

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?