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...
The method, my first method, which is automatically created, is a(n) __________________-level method.
Fill in the blank(s) with the appropriate word(s).
HTML version ____ added support for style sheets to give Web designers greater control over page layout and appearance.
A. 1.0 B. 2.0 C. 3.0 D. 4.01
When creating presentations, remember the KISS principle: Keep It ________!
A) Short and Snappy B) Snappy and Simple C) Simple and Showy D) Short and Simple
The ____ refers to the order in which the focus moves from one control to another control when a user presses the Tab key.
A. tab alignment B. tab stop C. tab order D. tab focus