summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--java.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/java.html.markdown b/java.html.markdown
index 36d56625..dd875c16 100644
--- a/java.html.markdown
+++ b/java.html.markdown
@@ -312,7 +312,7 @@ public class LearnJava {
System.out.println("2-1 = " + (i2 - i1)); // => 1
System.out.println("2*1 = " + (i2 * i1)); // => 2
System.out.println("1/2 = " + (i1 / i2)); // => 0 (int/int returns int)
- System.out.println("1/2 = " + (i1 / (double)i2)); // => 0.5
+ System.out.println("1/2.0 = " + (i1 / (double)i2)); // => 0.5
// Modulo
System.out.println("11%3 = "+(11 % 3)); // => 2