OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [err11.java] - Blame information for rev 830

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
/*--------------------------------------------------------------------------*/
2
/* File name : err11.java                                                   */
3
/*            :                                                             */
4
/* Cause      : If I declare both array which have more than 10 element     */
5
/*            : and switch statement, make error.                           */
6
/*            :                                                             */
7
/* Message    : err11.java:1: Missing class name.                      */
8
/*            : public class err11                                     */
9
/*            :              ^                                              */
10
/*            : err11.java:1: Class or interface declaration expected. */
11
/*            : public class err11                                     */
12
/*            :              ^                                              */
13
/*            : 2 errors                                                    */
14
/*--------------------------------------------------------------------------*/
15
 
16
public class err11
17
{
18
        public static void main(String args[])
19
        {
20
                int i;
21
                short ary1[] = {12,23,34,45,56,67,78,89,90,111};
22
 
23
                for(i=0; i<10; i++) {
24
                        switch(ary1[i]) {
25
                                case 111 : System.out.println("OK");
26
                                default : break;
27
                        }
28
                }
29
        }
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.