source: trunk/src/gcc/libjava/testsuite/libjava.lang/err9.java@ 2

Last change on this file since 2 was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1/*--------------------------------------------------------------------------*/
2/* File name : err9.java */
3/* : */
4/* Cause : When I use "labeled continue" in "for"statement, error */
5/* : */
6/* Message : In class `err9': */
7/* : In method `main(java.lang.String[])': */
8/* : 22: `continue' must be in loop. */
9/* : continue movehere; */
10/* : ^ */
11/* : 1 error */
12/*--------------------------------------------------------------------------*/
13
14public class err9 {
15 public static void main(String[] args) {
16 int y = 0;
17
18 movehere: for ( int x = 0; x < 10; x++ ) {
19 if ( x > 2 ) {
20 continue movehere;
21 }
22 y++;
23 }
24
25 if ( y == 3 ) {
26 System.out.println("OK");
27 } else {
28 System.out.println("NG:[3]-->[" +y+ "]");
29 }
30 }
31}
32
Note: See TracBrowser for help on using the repository browser.