Java Tutorial #8 Quiz

Q1: Select the correct operator that would make the value of total = 50;
int total = 25 _ 2;

Q2: If we declare the following variable int num1 = 20;, how would we rewrite the following code to use our new variable instead of the actual number?
int total = 20+5;

Q3: Given the following variable declaration which of these statements would print out 40?
int total = 30;

Q4: Given the following variable declaration which of these statements would print out 100?
int num1 = 20;
int num2 = 5;

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