Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- 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");
- 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");
- 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");
- 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")
- System.out.println("Lorem Ipsum is simply dummy text of the printingn" +
- "and typesetting industry. Lorem Ipsum has beenn " +
- "the industry's standard dummy tex");
- 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");
- 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");
- String string1 = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.-Lorem Ipsum has been the industry's standard dummy tex";
- String[] parts = string1.split("-");
- String part0 = parts[0]; // Lorem Ipsum is simply dummy text of the printing and typesetting industry.
- String part1 = parts[1]; //Lorem Ipsum has been the industry's standard dummy tex
- System.out.println(part0);
- if (string.contains("-")) {
- // Split it.
- }
- else {
- throw new IllegalArgumentException("String " + string1 + " does not contain-");
- }
Add Comment
Please, Sign In to add comment