Compound Operators in Java

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Patrick Bryar
Used 3+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int j = 10;
int k = 8;
j += 2;
k += j;
System.out.print(j);
System.out.print(" ");
System.out.println(k);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 5;
int y = 3;
x *= 2;
y += x;
System.out.print(x);
System.out.print(" ");
System.out.println(y);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int a = 12;
int b = 7;
a -= 3;
b *= a;
System.out.print(a);
System.out.print(" ");
System.out.println(b);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int p = 6;
int q = 4;
p /= 2;
q -= p;
System.out.print(p);
System.out.print(" ");
System.out.println(q);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int m = 9;
int n = 2;
m %= 3;
n += m;
System.out.print(m);
System.out.print(" ");
System.out.println(n);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int r = 15;
int s = 5;
r += 10;
s *= r;
System.out.print(r);
System.out.print(" ");
System.out.println(s);
25 125
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code segment is executed?
int u = 20;
int v = 3;
u -= 5;
v *= u;
System.out.print(u);
System.out.print(" ");
System.out.println(v);
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Python Basics - Year 8

Quiz
•
7th - 9th Grade
10 questions
Study Guide - More Advanced Java

Quiz
•
11th - 12th Grade
9 questions
ПИТОН

Quiz
•
9th Grade
15 questions
Progamming - Java Syntax

Quiz
•
11th - 12th Grade
7 questions
Pentaksiran T4(menulis kod arahan Java)

Quiz
•
11th Grade
15 questions
Java Math

Quiz
•
9th - 12th Grade
11 questions
while and do while Loop

Quiz
•
10th Grade
10 questions
STRING MANIPULATION (PYTHON)

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade