Skip to content

Instantly share code, notes, and snippets.

@ilyaBrandon
Created February 17, 2016 20:41
Show Gist options
  • Save ilyaBrandon/5d403801d548df4f84b6 to your computer and use it in GitHub Desktop.
Save ilyaBrandon/5d403801d548df4f84b6 to your computer and use it in GitHub Desktop.
public class Documents {
public static void main(String[] args) {
double value = 25.6;
String str = String.valueOf(value);
int p= str.indexOf('.');
System.out.println(str.substring(0,p));
System.out.println(str.substring(p+1));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment