-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFortunes.java
More file actions
27 lines (22 loc) · 951 Bytes
/
Fortunes.java
File metadata and controls
27 lines (22 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.Random;
public class Fortunes {
static String[] fortunes = {"Do not be afraid of competition",
"An exciting opportunity lies ahead of you",
"You love peace",
"Get your mind set…confidence will lead you on",
"You will always be surrounded by true friends",
"Sell your ideas-they have exceptional merit",
"Sell your ideas-they have exceptional merit",
"You should be able to undertake and complete anything",
"You are kind and friendly",
"You are wise beyond your years",
"Your ability to juggle many tasks will take you far",
"A routine task will turn into an enchanting adventure",
"Beware of all enterprises that require new clothes",
"Be true to your work, your word, and your friend" };
public static void main(String[] args) {
Random rand = new Random();
int r = rand.nextInt(fortunes.length);
System.out.println("Your fortune today is: " + fortunes [r] + "!");
}
}