--- "Stacy C. May" <[EMAIL PROTECTED]> wrote:
> Is there a difference in JVM overhead/expense the
> following code? and why?
> 
> public void someMethod(List passedList) {
> 
>     Iterator iter = passedList.iterator();
> 
>     while (iter.hasNext()) {
> 
>         MyObject myObject = (MyObject)iter.next();
> 
>         // do some processing on myObject
>     }
> }
> 
> compared to:
> 
> public void someMethod(List passedList) {
> 
>     Iterator iter = passedList.iterator();
>     MyObject myObject = null;
> 
>     while (iter.hasNext()) {
> 
>         myObject = (MyObject)iter.next();
> 
>         // do some processing on myObject
>     }
> }
> 
> Thanks in advance.
> N�!jxʋ���z�!��)�*'���z�h��i��0�̬r�ܢo�j���+-q�


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to