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;
}
```
You might also like to view...
Which tab would you use in order to insert a text box?
A) The Home tab B) The Text Box tab C) The Page Layout tab D) The Insert tab
The following sentence applies number rules correctly. My home is at 8 Weber Drive; my office is at One Corry Plaza.?
Answer the following statement true (T) or false (F)
To protect yourself from social engineering scams, shred all sensitive or confidential documents.
Answer the following statement true (T) or false (F)
A typical ____________________ router has somewhere around 750,000 routes in its routing table, requiring a router with massive firepower.
Fill in the blank(s) with the appropriate word(s).