summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/err10.java
blob: afdb4e05504c27136267ffdfcf58dfb4b2ca7a4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*--------------------------------------------------------------------------*/
/* File name  : err10.java                                                  */
/*            :                                                             */
/* Cause      : Operator >>> doesn't work correctly when value is negative. */
/*            :                                                             */
/* Message    : NG : a = -2                                                 */
/*--------------------------------------------------------------------------*/

public class err10 {
  public static void main(String[] args) {
    int a = -3;

    a = a>>>1;

    if ( a == 2147483646 ) {
      System.out.println("OK"); 
    } else {
      System.out.println("NG:[2147483646]-->[" +a+ "]"); 
    }

  }
}