summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/N19990310_02.java
blob: 0c5bd03e95fb4e1597847e6fe54470897fae6396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*--------------------------------------------------------------------------*/
/* Name       : N19990310_02                                                */
/*            :                                                             */
/* Cause      : Array value calculation in for,while,do while loop is not   */
/*            : correct                                                     */
/*            :                                                             */
/* Message    : NG:[3]-->[2]                                                */
/*--------------------------------------------------------------------------*/

public class N19990310_02 {
	public static void main(String[] args) {
		int y[] = {2};
		for ( int i = 0; i < 1; i++ ) {
			y[i] += 1;
			if ( y[i] != 3 ) {
				System.out.println("NG:[3]-->[" +y[i]+ "]");
			}
			else
			  System.out.println("OK");
		}
	}
}