M
M
Max Bogachov2017-02-04 20:23:50
Java
Max Bogachov, 2017-02-04 20:23:50

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

1 answer(s)
N
Nikita Dergachov, 2017-02-04
@Geekinder

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 question

Ask a Question

731 491 924 answers to any question