— Scott McNealy, Sun Microsystems Chairman, President and ceo



Download 40,57 Mb.
Pdf ko'rish
bet33/555
Sana26.05.2022
Hajmi40,57 Mb.
#609235
1   ...   29   30   31   32   33   34   35   36   ...   555
Bog'liq
Head First Java (Kathy Sierra, Bert Bates) (z-lib.org)

}
}

Java
 class
Don’t worry about memorizing anything right now... 
this chapter is just to get you started.


you are here
4
dive In 
A Quick Dip
9
MyFirstApp.class
Writing a class with a 
main
In Java, everything goes in a class. You’ll type your source code fi le (with a 
.java extension), then compile it into a new class fi le (with a .class extension).
When you run your program, you’re really running a class.
Running a program means telling the Java Virtual Machine (JVM) to “Load the 
Hello 
class, then start executing its 
main() 
method. Keep running ‘til all the 
code in main is fi nished.”
In chapter 2, we go deeper into the whole 
class thing, but for now, all you need to 
think is, how do I write Java code so that it will run? And it all begins with main().
The main() method is where your program starts running.
No matter how big your program is (in other words, no matter how many classes 
your program uses), there’s got to be a main() method to get the ball rolling.

Download 40,57 Mb.

Do'stlaringiz bilan baham:
1   ...   29   30   31   32   33   34   35   36   ...   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