I have this import statement:
import java.util.List
Input:
public class solution{ List<String> words (String text, List<String> bannedWords) {//BodyOfMethod } }
expected Output: list of strings
My code:
HashSet<String> bannedWords = new HashSet<>();
HashMap<String, Integer> validWordsCount = new HashMap<>();
List<Character> result = List<>();
It says error can't find symbol for the lines above. My syntax is wrong (I think it's out dated, from an old tutorial). Can I write it as Map instead of HashMap?
Can someone please tell me the correct syntax for the the variable to the input and output?