Advertisement

Iterables and Iteration

  • Edward Sciore
Chapter

Abstract

This chapter examines the question of how to iterate through a collection of objects. The chapter examines external iteration, in which you write a loop to examine the elements, and internal iteration, in which you call a method to perform the loop for you. The methods of the Java Stream interface are discussed, which provide a powerful example of internal iteration.

Copyright information

© Edward Sciore 2019

Authors and Affiliations

  • Edward Sciore
    • 1
  1. 1.NewtonUSA

Personalised recommendations