Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save e-tverdokhleb/c7d28c9a019506939283 to your computer and use it in GitHub Desktop.
Save e-tverdokhleb/c7d28c9a019506939283 to your computer and use it in GitHub Desktop.
public class main {
public static void main(String[] args) {
double value = 25.6;
System.out.println((String.valueOf(value).substring(0, String.valueOf(value).indexOf("."))) +'\n' +
(String.valueOf(value).substring(String.valueOf(value).indexOf(".") + 1, String.valueOf(value).length())));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment