Description
A worksheet that allows students to practice a common AP Computer Science exam question: copying an array of Strings while excluding a specific target String. Includes fully coded answer!
Example:
Write a method that takes in an array of Strings and a “target” string, and returns a new array of Strings that does not include the target String.
String[] arrStr = {“a”, “c”, “u”, “ll”, “h”};
String target = “c”;
System.out.println(stringSelect(arrStr, target));
>> [“s”, “u”, “ll”, “h”]
Highlights
Description
A worksheet that allows students to practice a common AP Computer Science exam question: copying an array of Strings while excluding a specific target String. Includes fully coded answer!
Example:
Write a method that takes in an array of Strings and a “target” string, and returns a new array of Strings that does not include the target String.
String[] arrStr = {“a”, “c”, “u”, “ll”, “h”};
String target = “c”;
System.out.println(stringSelect(arrStr, target));
>> [“s”, “u”, “ll”, “h”]


