Computer Science, asked by jzanieparzker9786, 10 months ago

Write a program that will count the number of characters in a sentence entered by user.

Answers

Answered by dp17cr7
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