You probably had a typo when you first ran it.
evaluating 0.5 % 0.3
returns ‘0.2’ (A double) as expected.
Mindprod has a good overview of how modulus works in Java.
More Related Contents:
- logical OR in Java not working?
- How to get the separate digits of an int number?
- What’s the syntax for mod in java
- How does java do modulus calculations with negative numbers?
- Best way to make Java’s modulus behave like it should with negative numbers?
- How to create lag in Java? [duplicate]
- Solve Exception handling
- How do I remove objects from an array in Java?
- How to convert an ArrayList containing Integers to primitive int array?
- Why should I use the keyword “final” on a method parameter in Java?
- What is the Java equivalent for LINQ? [closed]
- The specified child already has a parent. You must call removeView() on the child’s parent first (Android)
- What causes a java.lang.StackOverflowError
- System.out to a file in java
- How to terminate a thread blocking on socket IO operation instantly?
- Different types of thread-safe Sets in Java
- Mockito: InvalidUseOfMatchersException
- How to change JFrame icon [duplicate]
- Catching Ctrl+C in Java
- Android Get Current timestamp?
- Unfinished Stubbing Detected in Mockito
- Html/Javascript debugging in JavaFX WebView
- How to represent empty char in Java Character class
- Java: Updating text in the command-line without a new line
- How to remove single character from a String by index
- How to center cells in JTable
- Component for filtering a list
- Enum within an enum
- How to deploy a Java Web Application (.war) on tomcat?
- Java Pi calculator getting stuck