Chapter 5Using Loop Constructs

THE OCA EXAM TOPICS COVERED IN THIS PRACTICE TEST INCLUDE THE FOLLOWING:

  • Using Loop Constructs
    • Create and use while loops
    • Create and use for loops including the enhanced for loop
    • Create and use do/while loops
    • Compare loop constructs
    • Use break and continue
  1. Which type of loop is best known for its boolean condition that controls entry to the loop?

    1. do-while loop
    2. for (traditional)
    3. for-each
    4. while
  2. Which type of loop is best known for using an index or counter?

    1. do-while loop
    2. for (traditional)
    3. for-each
    4. while
  3. Which type of loop is guaranteed to have the body execute at least once?

    1. do-while loop
    2. for ...

Get OCA / OCP Java SE 8 Programmer Practice Tests now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.