In a java enhanced for loop, is it safe to assume the expression to be looped over will be evaluated

Posted by morgancodes on Stack Overflow See other posts from Stack Overflow or by morgancodes
Published on 2010-04-21T21:10:48Z Indexed on 2010/04/21 21:13 UTC
Read the original article Hit count: 231

Filed under:

In the following:

for (String deviceNetwork : deviceOrganizer.getNetworkTypes(deviceManufacturer)) {
    // do something
}

Is it safe to assume that deviceOrganizer.getNetworkTypes(deviceManufacturer) will be called only once?

© Stack Overflow or respective owner

Related posts about java