Search Header Logo

Chapter1

Authored by Ngọc Phan

Computers

Professional Development

Used 9+ times

Chapter1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

What will happen when you compile and run the following code?

}

}

1 will be printed out

2 will be printed out

A compile time error will be generated

An exception will be thrown

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which will be compiled

double a = 100.0;

double a = 100_.0;

double a = 1_000.0;

double a = _100.0;

3.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which will be compiled

int val = null;

int val = 1;

int val = 1;

int len = val.length();

String val = "hello";

int len = val.length();

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which will be compiled

String main;

String $val;

String 1val;

String const;

5.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following legally fill in the blank so you can run the main() method from the command line?

public static void main(______)

String _name []

String [] 123

String ... abc

String [] $n

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which method declarations will enable a class to be run as a standalone program?

static void main(String args[ ])

public void static main(String args[ ])

public static main(String[ ] argv)

final public static void main(String [ ] array)

public static void main(String args[ ])

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following code print when run? 

Hello

It will not print anything.

It will not compile

It will throw an Error at runtime.

None of the above.

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?