Write a program that will count the number of characters in a sentence entered by user.
Answers
Answered by
2
Answer:
import java.util.Scanner;
public class scanner{ // Here class is scanner class can be diffrent
public static void main(String[]args){
Scanner ss = new Scanner(System.in);
String cc = ss.nextLine();
System.out.println(cc.length());
}
}
Explanation:
Similar questions