Write a method called countA that accepts a String parameter and returns the number of times the character 'A' is found in the string.

What will be an ideal response?

```
public int countA(String text)
{
int count = 0;
for (int index = 0; index < text.length(); index++)
if (text.charAt(index) == 'A')
count++;
return count;
}

```

Computer Science & Information Technology

You might also like to view...

Before you import Excel data into Access, it is good practice to remove ________

A) data labels B) blank rows C) column headings D) all charts

Computer Science & Information Technology

The distinguishing characteristic of an abstract method is ____.

A. no implementation details are included B. they cannot be included in abstract classes C. no parameters are found in the heading for the method D. methods may not include a return type

Computer Science & Information Technology