Skip to content

Instantly share code, notes, and snippets.

@alexejVasko
Created February 15, 2016 13:14
Show Gist options
  • Save alexejVasko/fffbab4f86d8f66144b3 to your computer and use it in GitHub Desktop.
Save alexejVasko/fffbab4f86d8f66144b3 to your computer and use it in GitHub Desktop.
public class ZakreplenieTeacher {
public static void main(String[] args) {
double myValue = 25.6;
System.out.println((String.valueOf(myValue)).substring(0, (String.valueOf(myValue)).indexOf(".")));
System.out.println((String.valueOf(myValue)).substring(((String.valueOf(myValue)).indexOf(".")+1), (String.valueOf(myValue)).length()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment