201801Solution
201801Solution
words[numWords].read();
words[numWords] =
Word.read();
•
•
•
•
•
•
•
•
•
public void start() {
// Constant to hold the maximum amount of chars
final int MAX = 200;
}
public class Word {
// maximum length a word can be
final static int MAX = 20;
// actual data of the word:
// characters
private char[] letters;
// actual length
private int length;
@Override
public String toString() {
String a = "";
for (int i = 0; i < length; i++) {
a += letters[i];
}
return a;
}
}