Something like this?
int x = -1;
long y = x & 0x00000000ffffffffL;
Or am I missing something?
public static long getUnsignedInt(int x) {
return x & 0x00000000ffffffffL;
}
Related Contents:
- Can we make unsigned byte in Java
- Why doesn’t Java support unsigned ints?
- Declaring an unsigned int in Java
- How to use the unsigned Integer in Java 8 and Java 9?
- Java equivalent of unsigned long long?
- What is the code in android studio [closed]
- same function working differently when called from two separate functions with same parameters [duplicate]
- Unicode equivalents for \w and \b in Java regular expressions?
- How do I check if a file exists in Java?
- How to list the files inside a JAR file?
- Properly removing an Integer from a List
- When to use generic methods and when to use wild-card?
- Is an array an object in Java?
- Java: define terms initialization, declaration and assignment
- Common elements in two lists
- Calling Java from Python
- Java KeyListener Not Registering Arrow Keys
- JMenuItem ImageIcon too big
- How to instantiate non static inner class within a static method?
- Servlet vs Filter
- Tomcat request timeout
- Is there an upper bound to BigInteger? [duplicate]
- Is JDK “upward” or “backward” compatible?
- Should I call ugi.checkTGTAndReloginFromKeytab() before every action on hadoop?
- How to Daemonize a Java Program?
- Interview question: Check if one string is a rotation of other string [closed]
- Android Studio – No JVM Installation found
- Peer not authenticated while importing Gradle project in eclipse
- this: Cannot use this in static context
- When should we use Observer and Observable?
- Access restriction: Is not accessible due to restriction on required library ..\jre\lib\rt.jar
- Http Post request with content type application/x-www-form-urlencoded not working in Spring
- How to clear PermGen space Error in tomcat
- Convert two dimensional array to List in java?
- How to delete a folder with files using Java
- Java: splitting the filename into a base and extension
- Why does a Java if statement fail when it ends in semicolon [duplicate]
- What could be the cause of RejectedExecutionException
- How to extract epoch from LocalDate and LocalDateTime?
- How do I give Jenkins more heap space when it’s running as a daemon on Ubuntu?
- Does close ever throw an IOException?
- debug java program step by step in Eclipse
- Immutable Type: public final fields vs. getter
- Writing a new refactoring plugin for Eclipse?
- Is there a way to search webelement on a main window first, if not found, then start searching inside iframes?
- How do I create some variable type alias in Java
- What does the UseCompressedOops JVM flag do and when should I use it?
- Custom Layout for DialogFragment OnCreateView vs. OnCreateDialog
- How to set response header in JAX-RS so that user sees download popup for Excel?
- Cleanup after all junit tests