Created
September 21, 2010 04:12
-
-
Save inklesspen/589176 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inklesspen.firejam; | |
| public class IntTypes { | |
| public static void main(String[] args) { | |
| long a = 4294967285L; | |
| System.out.println(a); | |
| int b = (int) a; | |
| System.out.println(b); | |
| int c = b + 100; | |
| System.out.println(c); | |
| long d = (a + 100) & 0xFFFFFFFFL; | |
| System.out.println(d); | |
| } | |
| } | |
| /* | |
| Output: | |
| 4294967285 | |
| -11 | |
| 89 | |
| 89 | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment