You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DeclarationsInLoopsCE.java 402B

1234567891011
  1. /** @testcase PR#722 loop expressions not declarations */
  2. public class DeclarationsInLoopsCE {
  3. void method() {
  4. boolean b = true;
  5. for (;b;) int j = 0; // CE 7 illegal start of expression, not a statement
  6. while (b) int k = 0; // CE 8 illegal start of expression, not a statement
  7. do int l = 0; while (b); // CE 9 illegal start of expression, not a statement
  8. }
  9. }