menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
What is printed when the following code has been executed? int x = 15; int y = 4; System.out.println((2 * x + y) % x); 15 4 34 2 19
asked
Oct 9, 2022
6.9k
views
1
vote
What is printed when the following code has been executed?
int x = 15;
int y = 4;
System.out.println((2 * x + y) % x);
15
4
34
2
19
Computers and Technology
college
Gbru
asked
by
Gbru
8.8k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
Hey it is 15 hope this helps
Joyann
answered
Oct 15, 2022
by
Joyann
7.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Aug 10, 2024
109k
views
Consider the following code segment. int x = 0; x++; x += 1; x = x + 1; x -= -1; System.out.println(x); What is printed when the code segment has been executed? A. 0 B. 1 C. 2 D. 3 E. 4
Diego ZoracKy
asked
Aug 10, 2024
by
Diego ZoracKy
7.7k
points
Computers and Technology
high-school
1
answer
5
votes
109k
views
asked
Apr 7, 2024
158k
views
Consider the following code segment: ArrayList list = new ArrayList(); list.add("One"); list.add("Two"); list.add("Three"); list.add("Four"); list.add("Five"); list.add("Six"); for (int i= 0; i < list.size(); i++) { list.remove(i); } System.out.println(list.toString()); What is printed when the code segment is executed? [] ["Two", "Four] ["Two", "Four", "Six"] ["Four", "Five", "Six"] ["Six"]
Yesterdaysfoe
asked
Apr 7, 2024
by
Yesterdaysfoe
8.3k
points
Computers and Technology
high-school
1
answer
2
votes
158k
views
asked
Sep 18, 2020
52.4k
views
Consider the following code segment, which uses the int value a. if ((a > 12) || (a < 4)) System.out.println("New value: " + a/3); else System.out.println("New value: " + 2*a); For which, if any, of the following initial values of a will the statement "New value: 4" be printed when the code is executed?
Bretsko
asked
Sep 18, 2020
by
Bretsko
7.9k
points
Mathematics
high-school
1
answer
2
votes
52.4k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org