The Artima Developer Community
Sponsored Link

Java Buzz Forum
Iterating over collections in Java 8

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
News Manager

Posts: 47623
Nickname: newsman
Registered: Apr, 2003

News Manager is the force behind the news at Artima.com.
Iterating over collections in Java 8 Posted: Aug 7, 2014 3:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by News Manager.
Original Post: Iterating over collections in Java 8
Feed Title: JavaWorld
Feed URL: http://www.javaworld.com/index.rss
Feed Description: JavaWorld.com: Fueling Innovation
Latest Java Buzz Posts
Latest Java Buzz Posts by News Manager
Latest Posts From JavaWorld

Advertisement

The Java platform includes a variety of ways to iterate over a collection of objects, including new options based on features introduced in Java 8. In this article John Moore revisits the Iterator design pattern with attention to the difference between active and passive iterators. Learn how Java 8's forEach() method and features of the Stream API can help you fine-tune and parallelize the behavior of your iterators, then conclude with some performance benchmarks that might surprise you.

Anytime you have a collection of things you will need some mechanism to systematically step though the items in that collection. As an everyday example, consider the television remote control, which lets us iterate over various television channels. Similarly, in the programming world, we need a mechanism to systematically step through a collection of software objects. The mechanism used for this purpose is known by various names, including index (for iterating over an array), cursor (for iterating over the results of a database query), enumeration (in early versions of Java), and iterator (in more recent versions of Java).

To read this article in full or to leave a comment, please click here

Read: Iterating over collections in Java 8

Topic: Tutorial – REST API design and implementation in Java with Jersey and Spring Previous Topic   Next Topic Topic: HawtIO on JBoss Wildfly 8.1

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use