Java Tutorial #11 Quiz

Q1: Given the following code, what is the final value of the myAge variable?
int myAge = 15;
myAge = myAge + 3;

Q2: *= is a shorthand division operator.

Q3: If myAge = 20, which of the following changes that value to 10?

Q4: What is the shorthand version of the following code?
myAge = myAge - 5;

Q5: What is the long version of the following code?
myAge *= 3;

Did you find our site helpful? Consider donating to help us provide more quality content.