Java Method To Remove Spaces From String Matlab