Java Code Tracing Practice A

Java Code Tracing Practice A

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Programs and Variables in Code and Play

Programs and Variables in Code and Play

5th - 9th Grade

7 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

Inspire - AI Trivia

Inspire - AI Trivia

11th Grade

10 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

9th - 12th Grade

15 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

Revision Gr2-2025

Revision Gr2-2025

3rd Grade - University

12 Qs

8525 AQA GCSE  3.1.1 Pseudo-code

8525 AQA GCSE 3.1.1 Pseudo-code

10th - 11th Grade

14 Qs

Java Code Tracing Practice A

Java Code Tracing Practice A

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

CHRISTOPHER TARANGO

Used 156+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the output of the code segment :


out.print(45-8*2/3+-6);

34

18

-24

50

46

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the output of the code segment :


out.println("Socks");

out.print("Bubba");

out.println("Binky");

Socks

Bubba

Binky

SocksBubbaBinky

Socks

BubbaBinky

SocksBubba

Binky

Socks Bubba Binky

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the output of the code segment:


String str="abcdefgh";

out.print(str.substring(4)+ str.substring(1, 3));

defghab

efghbc

defghabc

efghbcd

fghbcd

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the lines shown on the right will print false?


boolean a=true,b=true,c=true;

out.println(a&&b&&c);//line #1

out.println(a&&b||c);//line #2

out.println(a&&b^c);//line #3

out.println(a||b^c);//line #4

line 1

line 2

line 3

line 4

more than one line

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

Which of the following represents the output of the main method shown?

125 5 50 10

125 55 50 10

275 5 50 10

275 55 50 5

0 50 5 10

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What is the output of the code segment above?

true true true

true false true

true false false

false true false

false true true

7.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What is printed by the code segment above?

11.25

Total=11.25

Total=11

Total=74.25

Total=74

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?