What values will be printed after the following statements execute?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question
Assume the variables apples, bananas, pears, oranges, and strawberries are all integers, and that apples = 15, bananas = 4, pears = 10,
oranges = 18, and
strawberries = 20.
What values will be printed after the following statements execute?
apples+=10;
bananas*=10;
pears-=10;
oranges=oranges$3;
strawberries+=apples;
System.out.println (
+ "| " +
+ " | " +
+ "| " +
"|" +
);
Transcribed Image Text:Assume the variables apples, bananas, pears, oranges, and strawberries are all integers, and that apples = 15, bananas = 4, pears = 10, oranges = 18, and strawberries = 20. What values will be printed after the following statements execute? apples+=10; bananas*=10; pears-=10; oranges=oranges$3; strawberries+=apples; System.out.println ( + "| " + + " | " + + "| " + "|" + );
Expert Solution
steps

Step by step

Solved in 7 steps

Blurred answer
Knowledge Booster
Literals
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning