Guest User

Untitled

a guest
Jun 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. System.out.println("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex")
  2.  
  3. System.out.println("Lorem Ipsum is simply dummy text of the printing" +
  4. "and typesetting industry. Lorem Ipsum has been " +
  5. "the industry's standard dummy tex");
  6.  
  7. System.out.println("Lorem Ipsum is simply dummy text"
  8. + " of the printing and typesetting industry. "
  9. + "Lorem Ipsum has been the industry's "
  10. + "standard dummy tex");
  11.  
  12. System.out.println("Lorem Ipsum is simply dummy text of the printing and typesetting industry." +
  13. " Lorem Ipsum has been the industry's standard dummy tex");
  14.  
  15. System.out.println("Lorem Ipsum is simply dummy text of the printing and" +
  16. " typesetting industry. Lorem Ipsum has been the industry's" +
  17. " standard dummy tex")
  18.  
  19. System.out.println("Lorem Ipsum is simply dummy text of the printingn" +
  20. "and typesetting industry. Lorem Ipsum has beenn " +
  21. "the industry's standard dummy tex");
  22.  
  23. System.out.println("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex");
  24.  
  25. System.out.println("Lorem Ipsum is simply dummy text of the printing and typesetting industry."
  26. +"Lorem Ipsum has been the industry's standard dummy tex");
  27.  
  28. String string1 = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.-Lorem Ipsum has been the industry's standard dummy tex";
  29.  
  30. String[] parts = string1.split("-");
  31. String part0 = parts[0]; // Lorem Ipsum is simply dummy text of the printing and typesetting industry.
  32. String part1 = parts[1]; //Lorem Ipsum has been the industry's standard dummy tex
  33. System.out.println(part0);
  34.  
  35. if (string.contains("-")) {
  36. // Split it.
  37. }
  38. else {
  39. throw new IllegalArgumentException("String " + string1 + " does not contain-");
  40. }
Add Comment
Please, Sign In to add comment