Skip to content

Instantly share code, notes, and snippets.

@edinak1
Created October 17, 2015 19:04
Show Gist options
  • Save edinak1/d967ff03125bbe680ff4 to your computer and use it in GitHub Desktop.
Save edinak1/d967ff03125bbe680ff4 to your computer and use it in GitHub Desktop.
package homeWork1;
public class Namber {
public static void main(String[] args) {
double value=-7643546.0000004;
String strValue=String.valueOf(value);
long a=Long.valueOf(strValue.substring(0, strValue.indexOf(".")));
long b=Long.valueOf(strValue.substring(strValue.indexOf(".")+1));
System.out.println(a);
System.out.println(b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment