Java for Fucking Idiots: Learn the Basics of Java Programming Without any experience!



Download 3,91 Mb.
Pdf ko'rish
bet13/70
Sana02.04.2022
Hajmi3,91 Mb.
#524999
1   ...   9   10   11   12   13   14   15   16   ...   70
Bog'liq
Java for Fucking Idiots

public class
HelloWorld {
public static void
main(String[] args) {
int
myNumber =
420
;
boolean
shouldBlazeIt =
true
;
char
charmander =
'C'
;
double
moneyInTheBank =
500.36
;
long
speedOfLight =
299792458L
;
String bestAuthor =
"Steve"
;
}
}
Feel free to do something that won’t work. Push the limits of the Java
compiler. For example, you could write this line of code:
int
wellThisIsJustWrong =
false
;
Then compile and run the code. It will throw a conniption, send a report to
NASA, and inform your internet service provider to immediately cancel
your plan.


CHAPTER 5: OPERATORS
 
“Hello operator? Get me the navy!
[You’ve reached the Navy’s automated phone service.]
Squidward! The robots have taken over the Navy!
Not the Navy!!!” – Spongebob Squarepants
OK, so now you know the basics of variables. Hopefully.
Now let’s look at operators , or ways that we can interact with our
variables.
What’s an operator?
They’re special symbols that do special things. Maybe you want to add two
values. Or see if two values are the same. Or check if a number is greater
than or equal to another.
Or, you want to do all the above. Operators ahoy!
Note that operators are not variables. They’re not methods, they’re not
objects, they’re not data types, and they’re just not that into you.
They’re like the buttons on your calculator that aren’t the numbers.
The math operators!
Let’s get it started!
Add numbers with +
Subtract numbers with 


Divide numbers with /
Multiply numbers with *
This is just as easy it sounds for 99% of scenarios.

Download 3,91 Mb.

Do'stlaringiz bilan baham:
1   ...   9   10   11   12   13   14   15   16   ...   70




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