-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy pathPhraseOMatic.java
More file actions
executable file
·31 lines (27 loc) · 1.18 KB
/
PhraseOMatic.java
File metadata and controls
executable file
·31 lines (27 loc) · 1.18 KB
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
28
29
30
31
package chap01;
public class PhraseOMatic {
public static void main (String[] args) {
String[][] wordMatrix = {
{
"24/7", "multi-Tier", "30,000 foot", "B-to-B",
"win-win", "frontend", "web-based", "pervasive", "smart",
"six-sigma", "critical-path", "dynamic"
},
{
"empowered", "sticky", "value-added", "oriented",
"centric", "distributed", "clustered", "branded", "outside-the-box",
"positioned", "networked", "focused", "leveraged", "aligned", "targeted",
"shared", "accelerated"
},
{
"process", "tipping-point", "solution", "architecture",
"core competency", "strategy", "mindshare", "portal", "space", "vision",
"paradigm", "mission"
}};
String phrase = "";
for (int n = 0; n < wordMatrix.length; ++n)
phrase = String.format("%s %s",
phrase, wordMatrix[n][(int) (Math.random() * wordMatrix[n].length)]);
System.out.format("What we need is a %s.\n", phrase);
}
}