You are on page 1of 2

4/25/2021 JFo Section 3 Quiz 1 - L1-L2

Test: JFo Section 3 Quiz 1 - L1-L2


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 3 Quiz 1 - L1-L2


(Answer all questions in this section)

1. What is the range of the byte data type? Mark for Review

(1) Points
–27 to 27–1 (*)

–215 to 215–1

–231 to 231–1

–263 to 263–1

Correct

2. How many bits are in a byte? Mark for Review

(1) Points
2

4
6

7
8 (*)

Correct

3. What is the output? Mark for Review

public class Person { (1) Points


  public static void main(String args[]) {
  int age = 20;
  System.out.println("Value of age: " +age);
  age = 5 + 3;
  System.out.println("Value of age: " +age);
  age = age + 1;
  age++;
  System.out.println("Value of age: " +age);
 }
}
Value of age: 20
Value of age: 8
Value of age: 10 (*)
Value of age: 20
Value of age: 28
Value of age: 38

Value of age: 20
Value of age: 208
Value of age: 20810
Value of age: 20
Value of age: 8
Value of age: 9
https://myacademy.oracle.com/player/play?in_sessionid=28539411210A51AJ&classroom_id=74941475 1/2
4/25/2021 JFo Section 3 Quiz 1 - L1-L2
Value of age: 9

Correct

4. What is the output? public static void main(String args[]) { Mark for Review
  int x = 100;
  int y = x; (1) Points
  y++;
  System.out.println("Value of x is " + x);
  System.out.println("Value of y is " + y);
}
Value of x is 0
Value of y is 1

Value of x is 100
Value of y is 1
Value of x is 100
Value of y is 1
Value of x is 100
Value of y is 101 (*)

Correct

5. Which two are recommended practices for naming final variables? Mark for Review

(1) Points
Capitalize every letter (*)

Separate words with an underscore (*)


Capitalize first letter
Separate words with an space

Correct

Page 1 of 3 Next Summary

https://myacademy.oracle.com/player/play?in_sessionid=28539411210A51AJ&classroom_id=74941475 2/2

You might also like