What is the output of the code segment :
out.print(45-8*2/3+-6);
Java Code Tracing Practice A
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
CHRISTOPHER TARANGO
Used 153+ times
FREE Resource
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
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
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
What is printed by the code segment above?
11.25
Total=11.25
Total=11
Total=74.25
Total=74
9 questions
Java For Loops
Quiz
•
9th - 12th Grade
11 questions
Java Boolean Statements
Quiz
•
11th Grade
10 questions
STRING HANDLING
Quiz
•
10th Grade
15 questions
Java Script Quiz
Quiz
•
9th - 12th Grade
10 questions
W8-11
Quiz
•
10th - 11th Grade
10 questions
Functions and Parameters Summative preview
Quiz
•
9th - 12th Grade
10 questions
Quiz 15 - Array Basics
Quiz
•
11th Grade
10 questions
Why Programming? Why Java?
Quiz
•
12th Grade
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade
25 questions
Spanish preterite verbs (irregular/changed)
Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)
Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1
Quiz
•
9th - 12th Grade
26 questions
June 19th
Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope
Quiz
•
10th Grade
20 questions
Figurative Language Review
Quiz
•
10th Grade
27 questions
STAAR English 1 Review
Quiz
•
9th Grade