Search Header Logo

JPE Quiz 1

Authored by Trung Dang

Computers

1st - 7th Grade

Used 5+ times

JPE Quiz 1
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

45 sec • 1 pt

What are the values of x and y?

x = 5;

y = ++x;

x = 5, y = 5

x = 5, y = 6

x = 6; y = 5

x = 6; y = 6

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which is valid declaration of a float variable?

float f = 1F;

float f = 1.0;

float f = "1";

float f = 1.0d;

3.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following declarations is/are valid:

1.bool b = null;

2.boolean b = 1;

3.boolean b = true|false;

4.bool b = (10<11);

5.boolean b = true||false;

1 and 4

2, 3, and 5

2 and 3

3 and 5

4.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

What will it print when compiled and run?

5

6

7

8

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Types of Java Comments include:

Single Line Comment

Multi Line Comment

Documentation Comment

A and B are TRUE

A, B and C are TRUE

6.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

What will the following code print?

1 2

2 3

12 2

12 1

It will not compile

7.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

What will be the output of the following code snippet?

0

1

2

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?