On this page in the source code for an example of Observer interface for a class of Observable type lists a for-loop inside a method. The for-loop is shown thus: for( ; period>=0; period--). This the Netbeans
IDE is flagging off as "Illegal start of expression.". Hence the program does not compile. What should be done?
OCA/OCP
Java SE7 Programmer I & II study guide on p326 through 328 list various formats for the for loop wherein : for( ; ; ) is an endless loop. The Netbeans IDE passes it as "legal" . Then there is a for( ; i < 10 ; ) with an inside-the-loop iteration expression. But this usage aslo is flagged as "Illegal".
I have Emailed a query to the author Herb Schildt, but in all likelihood this may not be answered in the near future. But I am working all by myself for certification. Please help.
Thanks in advance.