Re: Whats wrong with this code....



On 4/6/2005 at 6:58:43 PM, is0871@xxxxxxxxx wrote:

> If you can figure out whats wrong in the above code(wihout compiling)

One obvious problem is that you are iterating over a collection and
adding to the same collection in the process. This will result in a
ConcurrentModificationException.

--
Regards,

John McGrath
.



Relevant Pages

  • Visual Web Developer Express
    ... delpoy a test app to a remote web server, but compiling my project doesn't ... Is this because it's an express edition or whats the deal? ... Prev by Date: ...
    (microsoft.public.vstudio.general)
  • Re: Whats wrong with this code....
    ... >> If you can figure out whats wrong in the above code(wihout compiling) ... You're quite right that adding to a collection while iterating over it is ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: System-header, header-file, using and ::
    ... Even after reading I am trying ... so whats the safe practice with the least redundancy. ... The first stage when compiling is that the preprocessor scans the ...
    (alt.comp.lang.learn.c-cpp)
  • adding elements to the end of the list
    ... given a list a and element b whats the fastest way to add the element ... tconc procedure does not work if the list is not built using the ... one of the ways I can think of without iterating over the list is, ... Are there any faster methods? ...
    (comp.cad.cadence)
  • Problem using Bison & g++
    ... I'm having a problem compiling my parser's C code generated by Bison. ... The problem occurs when I use g++ but not when I use gcc. ... Whats ...
    (comp.unix.programmer)