Answer the question
In order to leave comments, you need to log in
How to make a letter counter in Java?
Good evening everyone! Help me make a counter of letters in a line, for example, the user enters a word, and after that the number of letters in this line is displayed on the console.
Answer the question
In order to leave comments, you need to log in
System.out.print("Enter string");
String str = in.nextLine();
System.out.println("String length" + str.length());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question