10:51 am - greencaped_k - Java, loops, and break (a simple but important question) I'm a little unsure about using break in loops with java. I tried to look this up online, and based on that, here is what I think would happen in this code: for ( i = 0; i < agentList.size(); i++ ) { a = (Agent) agentList.get(i); if ( a.getBirthDate() == getTickCount() ) break; do other stuff A; } do other stuff B;I think that if the if statement is true, and break is hit, then other stuff B gets done next. Is that right?Is there something other than break that could send flow back up to the for loop rather than out of the for loop if the if statement is true? I know I could put the rest of the stuff in the for loop (do other stuff A) in an if statement so it gets done only if the existing if statement is not true. I just wonder if there are options here (and I want to clear up my break confusion once and for all). Also, do you have a favorite online java resource to help answer questions like this?
02:41 pm - fiddle_dragon - Schema vs DTD Alright - so I'm about to write a Java app - probably with a web interfact via servlet or JSP or something.It needs to read an XML Schema or DTD to get the parameters it needs for the next step.But I'm confused as to whether I should use a Schema or a DTD - what are the pros and cons of each?[Edit - thanks guys - I think given the project, that an XML Schema is more along the lines of what I need]