0% found this document useful (0 votes)
71 views

Test: Jfo Section 3 Quiz 1 - L1-L2

The document summarizes the results of a quiz on Java fundamentals. It shows the questions, multiple choice answers, and indicates the correct answers with an asterisk. The quiz covers topics like data types, operators, and naming conventions. It tests knowledge of the range of byte data types, number of bits in a byte, how operations like assignment and incrementation affect variable values, and recommended practices for naming final variables.

Uploaded by

UPKM FT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Test: Jfo Section 3 Quiz 1 - L1-L2

The document summarizes the results of a quiz on Java fundamentals. It shows the questions, multiple choice answers, and indicates the correct answers with an asterisk. The quiz covers topics like data types, operators, and naming conventions. It tests knowledge of the range of byte data types, number of bits in a byte, how operations like assignment and incrementation affect variable values, and recommended practices for naming final variables.

Uploaded by

UPKM FT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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