ArrayList<String> aList = new ArrayList<String>(); String aString = "How de do de"; aList.add(aString);
String[] days = {"Monday", "Tuesday", "Wednsday"}; ArrayList<String> aList = new ArrayList<String>(); for(String eachString : days) { aList.add(eachString); }
Gumbi wrote: » I have tried userSpecifiedWords = new ArrayList<String>();
public WordSearchPuzzle(ArrayList<String> userSpecifiedWords) { this.puzzleWords = userSpecifiedWords // puzzle generation using user specified words // The user passes in a list of words to be used // for generating the word search grid. }
userSpecifiedWords = new ArrayList<String>();
WordSearchPuzzle(ArrayList<String> userSpecifiedWords)
henryporter wrote: » This looks suspiciously like the UL Games First Year Project:D
Kidchameleon wrote: » Hi OP, How exactly is it not working? are you sure you have this at the top of your code: import java.util.*; Array list needs this import to work...
Niall09 wrote: » It is expecting an arrayList object, but you are entering an array of 2 strings.
Dmeaney92 wrote: » What do you mean by its expecting an arrayList object? Why wont it accept the two strings entered?
public WordSearchPuzzle(ArrayList<String> userSpecifiedWords)
public WordSearchPuzzle(String wordOne, String wordTwo)