Question: The String class has a method called trim which returns a String that has the whitespace trimmed off of the left and right ends. It
The String class has a method called trim which returns a String that has the whitespace trimmed off of the left and right ends. It has no effect on whitespace between words. Predict the output that will be produced by the following code fragment? String s = abcd ; String t = abcd ; String u = ab cd ; System.out.println (s.trim( ) ) ; System.out.println (t.trim( ) ) ; System.out.println (u.trim( ) );
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
