Created
October 10, 2010 05:42
-
-
Save toby55kij/618998 to your computer and use it in GitHub Desktop.
This file contains 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
// g100pon #99 JavaとしてもGroovyとしても正当だが結果が異なるコード | |
// GroovyでもJavaでも動きます | |
public class Code099 { | |
public static void main(String[] args) { | |
//Java:0.6666666666666666,Groovy:0.6666666667 | |
System.out.println(2.0/3); | |
//おまけ:Java:0,Groovy:0.5 | |
System.out.println(1/2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment