?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Difficult

Method Signature Fill-in-the-Blank

APCSA-41FFKL

Given the following method, fill in the blanks with the valid data types needed in this method.:

public _______ doSomething( _______ b, _______ c ) 
{
     double sum = 0;
     c+=".";

     for ( int i = 0; i < b.size(); i++ )
     {
          if (b.get(i).substring(i, i+1).equals( c ))
               sum++;
     }
     return (int) sum;
}
A
public double doSomething( ArrayList b, int c )
B
public int doSomething( String[] b, String c )
C
public int doSomething( String[] b, int c )
D
public double doSomething( String b, String c )
E
public int doSomething( ArrayList<String> b, String c )