Package util
Class ReadWord
java.lang.Object
util.ReadFile
util.ReadWord
Extends the ReadFile to make getting a random word a bit more simple.
- Since:
- 2023-02
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a random word from the list of contents.Methods inherited from class util.ReadFile
checkContentsEmpty, checkFileExists, getDirectory, getFileContents, getRandomElement, readFile, setDirectory
-
Constructor Details
-
ReadWord
Initializes the superclass with the given directory.- Parameters:
directory
-
-
-
Method Details
-
getRandomWord
Returns a random word from the list of contents.- Returns:
- String
-