+ 1
String
first i Scan from console string word with spaces or characters and how do i find only letter's count. example.a is 5 b is 6or ? is 2
1 Answer
0
you can use loop like that :
int count = 0;
for (int i = 0 ; i < str.length() ; i++){
if(!str.charAt(i).equals(' '))
++count;
}