— Scott McNealy, Sun Microsystems Chairman, President and ceo



Download 40,57 Mb.
Pdf ko'rish
bet40/555
Sana26.05.2022
Hajmi40,57 Mb.
#609235
1   ...   36   37   38   39   40   41   42   43   ...   555
Bog'liq
Head First Java (Kathy Sierra, Bert Bates) (z-lib.org)

16
 
chapter 1
let’s write a 
program
Try my new 
phrase-o-matic and 
you’ll be a slick talker 
just like the boss or 
those guys in marketing.
public class PhraseOMatic {
public static void main (String[] args) {

// make three sets of words to choose from. Add your own!
String[] wordListOne = {“24/7”,”multi-
Tier”,”30,000 foot”,”B-to-B”,”win-win”,”front-
end”, “web-based”,”pervasive”, “smart”, “six-
sigma”,”critical-path”, “dynamic”};
String[] wordListTwo = {“empowered”, “sticky”, 
“value-added”, “oriented”, “centric”, “distributed”, 
“clustered”, “branded”,”outside-the-box”, “positioned”, 
“networked”, “focused”, “leveraged”, “aligned”, 
“targeted”, “shared”, “cooperative”, “accelerated”};
String[] wordListThree = {“process”, “tipping-
point”, “solution”, “architecture”, “core competency”, 
“strategy”, “mindshare”, “portal”, “space”, “vision”, 
“paradigm”, “mission”};
 
// find out how many words are in each list
int oneLength = wordListOne.length;
int twoLength = wordListTwo.length;
int threeLength = wordListThree.length;

// generate three random numbers
int rand1 = (int) (Math.random() * oneLength);
int rand2 = (int) (Math.random() * twoLength);
int rand3 = (int) (Math.random() * threeLength);

// now build a phrase
String phrase = wordListOne[rand1] + “ “ + 
wordListTwo[rand2] + “ “ + wordListThree[rand3];

// print out the phrase
System.out.println(“What we need is a “ + phrase);

}
1
2
3

Download 40,57 Mb.

Do'stlaringiz bilan baham:
1   ...   36   37   38   39   40   41   42   43   ...   555




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish