Defining the Main Method public



Download 15,35 Kb.
Sana31.12.2021
Hajmi15,35 Kb.
#244221
Bog'liq
Java Learning Notes


Defining the Main Method

public is an access modifier. An access modifier allows us to define the scope or how other parts of your code or even some else’s code can access this code.

static is a Java keyword that needs an understanding of other concepts, for now, know that we need to have static for java to find our method to run the code we are going to add.

void is yet another java keyword used to indicate that the method will not return anything.

Java operators or just operators perform an operation (hence the word) on a variable or value +, -, /

and * are four common ones.



Casting means to treat or convert a number from one type to another. We put the type we want number to be in parenthesis like this: (byte) (MinByteValue/2);

String is a datatype in Java, which is not a primitive type. It’s actually a Class, but it enjoys a bit of favoritism in Java to make it easier to use than a regular class.

Difference between OR/AND:

OR – kiritilgan qiymatning o’ng yoki chap tarafini true/false ga tekshiradi;

AND – kiritligan ifodaning ikkala tomonini ham true/false ga tekshiradi;
Expressions – int score = 50; score = 50; System.out.prinln(“You got the high score!”);

if (score > 10) –they are expressions.


Statements – They are the whole line till semi-colon(;).

int score = 50;

score = 50;

System.out.prinln(“You got the high score!”);



Data Types – They are all The Java Keyword like (int, double, if, float, else and etc.).

Java Keywords could be found here: https://en.wikipedia.org/wiki/List_of_Java_keywords.

Java Exercises could be found here: https://www.w3resource.com/java-exercises/basic/index.php.

Indenting – bu yasalgan ko’dning chiroyli(o’qiladigan) holatda jo’ylashuvi.

DiffMerge – bu yasagan ko’dingizda yo’l qo’yilgan mantiqiy va orfografik(Javaga oid) xatolarni to’g’irlab berish uchun xizmat qiladigan ilova.




O’zgaruvchi elementlari va ularning min va max qiymatlari.

int[-2147483648; 2147483647] – faqatgina butun sonli o’zgaruvchilarni o’z ichiga oladi. 32bit

byte[-128; 127] – faqatgina butun sonli o’zgaruvchilarni o’z ichiga oladi; 8bit

short[-32768; 32767] – faqatgina butun sonli o’zgaruvchilarni o’z ichiga oladi; 16bit

float – asosan kasr sonli o’zgaruvchilarni o’z ichiga oladi va butundan keyin maksimum 7ta sonni o’z ichiga oladi; masalan: 1.1234567;

double – asosan kasr sonli o’zgaruvchilarni o’z ichiga oladi va butundan keyin maksimum 16ta sonni o’z ichiga oladi; masalan: 1.1234567898765432; 32bit

char – bu raqam va harflarning kod variantida ifodalangan holati. Bitta char elementi uchun bitta Unicode berilishi kerak;

Unicode – Bu raqam va harflarning ko’d variantidagi ifodasi;

boolean – bu element faqatgina 2xil qiymatni qabul qila oladi, yani True, False yoki Yes, No yoki 1 va 0;

String – bu element Javada raqamlarni emas so’zlar va/yoki harflarni ifodalaydi, qo’shimcha qilib aytganda, so’zlar ifodasidagi harakterlarni bir biriga taqqoslash yoki tenglash;

If-thenx

\u0044A9
Download 15,35 Kb.

Do'stlaringiz bilan baham:




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