which method in an be used to remove any whitespace from both the beginning and the end of a string?
By Cassandra Mueller at Sep 21 2020
0
program in java. Get a string from user and also validate it’s length should be at least 1. Pass this string to a method that returns a new string with the first char added at the front and end, so "cat" yields "ccatc".