SHARE
TWEET

Untitled

a guest Jun 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class StringExample3
  2. {
  3.   public static void main(String args[])
  4.   {
  5.     final String FIRST = "Humpty Dumpty sat on a wall.";
  6.     final String SECOND = "Humpty Dumpty had a great fall.";
  7.     final String THIRD = "All the king's horses ";
  8.     final String FOURTH = " all the king's men ";
  9.     final String FIFTH = "couldn't put Humpty Dumpty " +
  10.                           " together again.";
  11.    
  12.     String first;
  13.     String second;
  14.     String third;
  15.     String fourth;
  16.     String fifth;
  17.     String newFifth;
  18.    
  19.     first = FIRST;
  20.     second = SECOND;
  21.     third = THIRD;
  22.     fourth = FOURTH;
  23.     fifth = FIFTH;
  24.     newFifth = fifth;
  25.    
  26.     newFifth = fifth.trim();
  27.     fifth = fifth.trim();
  28.     System.out.println(fifth);
  29.   }
  30. }
RAW Paste Data
Top