The program should continue as long as the user enters any


Generally, word processing programs can count and then display the number of characters in a document, either including or excluding blank characters. Using methods from the String class, write a program that will accept input from the keyboard and then display three values:

1) The count of all characters in the string, including leading and trailing blanks.

2) The count of characters not including leading and trailing blanks.

3) The count of all non-blank characters.

The program should continue as long as the user enters any values, even if only spaces are entered. Figure 9-49 (attached to post) displays sample output from the program.

345_cmd.png

Solution Preview :

Prepared by a verified Expert
JAVA Programming: The program should continue as long as the user enters any
Reference No:- TGS01250641

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)