Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Another great loop idea

Another great loop idea

Scheduled Pinned Locked Moved The Weird and The Wonderful
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    loctrice
    wrote on last edited by
    #1

    Found another loop digging through looking for something.

    Iterator i = foos.iterator();
    while (i.hasNext()) {
    i.next();
    }

    Elephant elephant elephant, sunshine sunshine sunshine

    P Sander RosselS 2 Replies Last reply
    0
    • L loctrice

      Found another loop digging through looking for something.

      Iterator i = foos.iterator();
      while (i.hasNext()) {
      i.next();
      }

      Elephant elephant elephant, sunshine sunshine sunshine

      P Offline
      P Offline
      phil o
      wrote on last edited by
      #2

      What's the problem? The loop is twice as fast...

      You always obtain more by being rather polite and armed than polite only.

      R 1 Reply Last reply
      0
      • P phil o

        What's the problem? The loop is twice as fast...

        You always obtain more by being rather polite and armed than polite only.

        R Offline
        R Offline
        Rob Grainger
        wrote on last edited by
        #3

        I prefer Vivian Stanshall's (Bonzo Dog Doo Dah Band) take on your sig: Neil Innes remembers that the band were reportedly stopped by a local U.S. sheriff and asked if they were carrying any firearms or drugs. When they denied both, the officer asked how they were going to defend themselves. Stanshall piped up from the back of the minibus, "With good manners!"

        "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

        1 Reply Last reply
        0
        • L loctrice

          Found another loop digging through looking for something.

          Iterator i = foos.iterator();
          while (i.hasNext()) {
          i.next();
          }

          Elephant elephant elephant, sunshine sunshine sunshine

          Sander RosselS Offline
          Sander RosselS Offline
          Sander Rossel
          wrote on last edited by
          #4

          That makes sense in the given content :)

          void DoNothing() {
          Iterator i = foos.iterator();
          while (i.hasNext()) {
          i.next();
          }
          }

          Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

          Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

          Regards, Sander

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups