Output:
Click Here For Java Online Compiler
Solution:
*** Trim Any Spaces From String *** Original String: Java Exercises New String: Java Exercises
Click Here For Java Online Compiler
Solution:
public class TrimString { public static void main(String[] args) { System.out.println("*** Trim Any Spaces From String ***" + "\n"); String string = " Java Exercises"; // Trim the whitespace from the front of the String. String newString = string.trim(); // Display the strings for comparison. System.out.println("Original String: " + string); System.out.println("New String: " + newString); } }
comment 1 comments:
more_vertnice article in your blog.thank you for sharing useful info.
29 August 2018 at 20:18visit
web programming tutorial
welookups
sentiment_satisfied Emoticon