The strip method is used to remove whitespace from the beginning and end of a string.

    
    String preamble = "   We the People  ";

    String preambleStrip = preamble.strip();

    System.out.println(preambleStrip);
    // "We the People"