It’s being parsed as this:
long i = (byte)( +(char)( -(int)( +(long)(-1) ) ) );
where all the +
and -
operators are unary +
or -
.
In which case, the 1
gets negated twice, so it prints out as a 1
.
More Related Contents:
- Count number of values of a list having same hash value in java?
- printing Prime numbers in java
- What is the meaning of “this” in Java?
- What is x after “x = x++”?
- How to parse/format dates with LocalDateTime? (Java 8)
- Properly removing an Integer from a List
- Java: Difference between the setPreferredSize() and setSize() methods in components
- The performance impact of using instanceof in Java
- What is the purpose of Java’s unary plus operator?
- What is Serialization?
- The specified DSN contains an architecture mismatch between the Driver and Application. JAVA
- Performance of StringTokenizer class vs. String.split method in Java
- How one interface can be used for different background android tasks?
- Stop scheduled timer when shutdown tomcat [duplicate]
- How to get string response from Retrofit2?
- Jackson: What happens if a property is missing?
- Convert LocalDate in DD/MM/YYYY LocalDate [duplicate]
- Where is the correct location to put Log4j.properties in an Eclipse project?
- How many string objects will be created in memory? [duplicate]
- incompatible types: HomeFragment cannot be converted to Fragment in Android
- How to get all imports defined in a class using java reflection?
- JavaFX Maven Plug-in: No plugin found for prefix ‘jfx’ in the current project and in the plugin groups
- Unable to install rJava in R 3.0 in Ubuntu 13.04
- Android keystore stopped working
- Why are interfaces preferred to abstract classes?
- Pattern for lazy thread-safe singleton instantiation in java
- transpose double[][] matrix with a java function?
- ternary operator not working
- How to Set Focus on JTextField?
- Download file from HTTPS server using Java [duplicate]