Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StringExample3
- {
- public static void main(String args[])
- {
- final String FIRST = "Humpty Dumpty sat on a wall.";
- final String SECOND = "Humpty Dumpty had a great fall.";
- final String THIRD = "All the king's horses ";
- final String FOURTH = " all the king's men ";
- final String FIFTH = "couldn't put Humpty Dumpty " +
- " together again.";
- String first;
- String second;
- String third;
- String fourth;
- String fifth;
- String newFifth;
- first = FIRST;
- second = SECOND;
- third = THIRD;
- fourth = FOURTH;
- fifth = FIFTH;
- newFifth = fifth;
- newFifth = fifth.trim();
- fifth = fifth.trim();
- System.out.println(fifth);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement