A

Admin • 828.03K Points
Coach

Q. Which of the following loops is best for traversing elements in a collection?

  • (A) for
  • (B) while
  • (C) do-while
  • (D) for-each
  • Correct Answer - Option(D)
  • Views: 15
  • Filed under category Java
  • Hashtags: Java Loops

Explanation by: Admin
for-each loop is designed for traversing arrays and collections.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.