public final class TipOfTheDay extends Object
| Modifier and Type | Field and Description |
|---|---|
private static Random |
r |
private static String[] |
TIPS |
private static boolean |
USE_INTERNET |
| Constructor and Description |
|---|
TipOfTheDay() |
| Modifier and Type | Method and Description |
|---|---|
static String |
get()
Randomly select a string
|
private static String[] |
getTips(boolean online)
Read strings from file and the internet.
|
private static String[] |
getTipsFromFile() |
private static String[] |
getTipsOnline() |
private static final boolean USE_INTERNET
private static final Random r
private static final String[] TIPS
public static String get()
private static String[] getTips(boolean online)
online - whether to read from the internetprivate static String[] getTipsFromFile() throws IOException
IOExceptionprivate static String[] getTipsOnline() throws IOException
IOException