Advertisement
KhaldMansour

Untitled

Jan 23rd, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import java.util.regex.*;
  2. import java.util.regex.*;
  3.  
  4. public class Demo2
  5. {
  6. public static void main(String [] args)
  7. {
  8. String rcvd = args[0];
  9. do
  10. {
  11. int ind = rcvd.indexOf(".");
  12. String part = rcvd.substring(0, ind);
  13. rcvd = rcvd.substring(ind+1 , rcvd.length());
  14. System.out.println(part);
  15. } while(rcvd.indexOf(".") != -1);
  16. System.out.println(rcvd);
  17.  
  18.  
  19. }
  20.  
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement