Search Header Logo

Java Refresher

Authored by Maryam Elahi

others

Used 1+ times

Java Refresher
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these statements would print the line "Hello World" to standard output?

system.out.println("Hello World");
System.out.println("Hello World")
System.out.println("Hello World");
system.out.println(Hello World);

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these is NOT an acceptable variable name?

fourWheels
_fourWheels
4wheels
$wheels

3.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of these is the correct way to declare a variable age and make it equal to 18?

int age = 18;
int age = 18
Integer age = 18;
age = 18;

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which variable type would you use if you want to use decimals?

char
int
double
String

5.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which of these is the correct way to declare a variable hello and make it equal to "Hello World"?

char hello = "Hello World";
String hello = "Hello World";
String hello = Hello World;
char[] hello = "Hello World";

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the following java program? 

7 35
Error
35 7

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these variable types is NOT primitive?

int
char
boolean
String

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?