package javaextrimstring; public class JavaExTrimString { public static void main(String[] args) { doTrim("abc def"); doTrim(" abc def "); doTrim(" abc def"); doTrim(" _ abc def"); } static private void doTrim(String s){ System.out.println(s + " => " + s.trim()); } }
Example of String.trim() |
No comments:
Post a Comment