summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/err11.java
blob: 7b1d0c7f14e7a0524b580d4fc869e180f590459b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*--------------------------------------------------------------------------*/
/* File name : err11.java                                                   */
/*            :                                                             */
/* Cause      : If I declare both array which have more than 10 element     */
/*            : and switch statement, make error.                           */
/*            :                                                             */
/* Message    : err11.java:1: Missing class name.                      */
/*            : public class err11                                     */
/*            :              ^                                              */
/*            : err11.java:1: Class or interface declaration expected. */
/*            : public class err11                                     */
/*            :              ^                                              */
/*            : 2 errors                                                    */
/*--------------------------------------------------------------------------*/

public class err11
{
	public static void main(String args[])
	{
		int i;
		short ary1[] = {12,23,34,45,56,67,78,89,90,111};

		for(i=0; i<10; i++) {
			switch(ary1[i]) {
				case 111 : System.out.println("OK");
				default : break;
			}
		}
	}
}