Connect with us!
How to use String.strip or strip() function in Java?
Overview strip() is a method or function of String in Java which returns back a string with all leading and trailing white spaces removed. This method was introduced in Java 11. Example Let’s declare a String variable str1 with leading…