To find number of character without space using java

Example:
String = prabu sun
No. of char =8

plz send me code