Trimming: You can remove in String Whitespace in to use function trim() , Right side to remove String Whitespace in to use function trimRight() , Left Side to remove String white space in to use function trimLeft() . void main(){ String str = "...