Created
September 17, 2018 10:08
-
-
Save petesh/bc7dc296faf9234bc8f72d8ad456a770 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
// Display the difference between a float being printed | |
// and a double being printed. | |
public class foo { | |
public static void main(String[] args) { | |
float valuef = 2.0f/3; | |
double valued = 2.0/3; | |
System.out.println(valuef); | |
System.out.println(valued); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment