On Jun 27, 8:39 pm, miga <[email protected]> wrote:
> On Jun 27, 10:45 pm, Dan <[email protected]> wrote:
>
> > while (i<names.length)
> > {i++;
>
> Move the line above
>
> > if (names[i].equals(searchName)){
> > foundName = true;
> > break;
> > }
> just here
> > }
>
>
OK--I finished this lesson last night, and initially had the i++
directly below the "break" (Inside the following }). I realized this
wouldn't work,
and then placed it correctly, but I still haven't entirely wrapped my
mind
around it. Am I misunderstanding exactly what "break;" does? Also,
am I
correct in that the i++ is still falling under the while condition in
this
placement? Not sure if I'm making myself clear, but any help would be
appreciated.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---