Question: In Java Instructor note: Recall that userText.charAt(x) returns the character located at index x. Recall that userText.length() returns the number of characters in String userText

In Java

Instructor note:

Recall that userText.charAt(x) returns the character located at index x. Recall that userText.length() returns the number of characters in String userText Since characters are primitive data types, the following conditions are valid if (userText.charAt(x) == '.')...... Outline of code might look like this: Read userText Use for loop to generate the indexes associated with userText check if the userText.charAt(index) is a blank, comma, or period if it is, then increment a counter display number of characters in userText minus the counter 

Given a line of text as input, output the number of characters excluding spaces, periods, exclamation points, or commas.

Note: Account for all characters that aren't spaces, periods, exclamation points, or commas (Ex: "r", "2", "?").

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!