Last change
on this file 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:
798 bytes
|
Line | |
---|
1 | /*--------------------------------------------------------------------------*/
|
---|
2 | /* File name : err10.java */
|
---|
3 | /* : */
|
---|
4 | /* Cause : Operator >>> doesn't work correctly when value is negative. */
|
---|
5 | /* : */
|
---|
6 | /* Message : NG : a = -2 */
|
---|
7 | /*--------------------------------------------------------------------------*/
|
---|
8 |
|
---|
9 | public class err10 {
|
---|
10 | public static void main(String[] args) {
|
---|
11 | int a = -3;
|
---|
12 |
|
---|
13 | a = a>>>1;
|
---|
14 |
|
---|
15 | if ( a == 2147483646 ) {
|
---|
16 | System.out.println("OK");
|
---|
17 | } else {
|
---|
18 | System.out.println("NG:[2147483646]-->[" +a+ "]");
|
---|
19 | }
|
---|
20 |
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.