Question 16

Given the code fragment:

What is the result?
  • Question 17

    Given the code fragment:

    Which for loop statement can be used to print 135?
  • Question 18

    Which package would you import to use the Random class?
  • Question 19

    Given:

    At which line does a compilation error occur?
  • Question 20

    Given the contents of Student.java:

    Which statement is true?