Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. package demonstration;
  2.  
  3. public class Unit1_Test4 {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. double str = 988.16646546;
  8. String numbers = String.valueOf(str);
  9.  
  10. System.out.println(numbers.substring(0, (numbers.indexOf("."))));
  11. System.out.println(numbers.substring(numbers.indexOf(".")+1));
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement