Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.StringTokenizer;
- public class Main {
- public static void main(String[] args) {
- String s = "sor amit tordelni kell";
- StringTokenizer st = new StringTokenizer(s);
- int hossz=0;
- while(st.hasMoreTokens()){
- String resz = st.nextToken();
- hossz+=resz.length();
- }
- System.out.println("Betuk szama: "+hossz);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement