At the moment, I have this:
do{
if (i < y){ //y is a constant
ObsHandler.obsPartsHandler(); //increment i twice
ObsHandler.search();
}
else {
break;
}
} while (!endline.equals(null)); // endline is changed during each loop cycle
With this loop, and the inputs I have, endline can not be null; this renders the while loop breaking condition redundant. When I try and convert this loop to a for loop, I get a misplaced construct error from Eclipse.
i.e:
for (i < y) {
ObsHandler.obsPartsHandler(); //increment i twice
ObsHandler.search(); }
Whilst, the while loop I have works, it seems like bad practice to me. Any suggestions? Thanks.