0% found this document useful (0 votes)
13 views2 pages

Java Encapsulation and Multithreading Guide

The document discusses key programming concepts including encapsulation, immutability, and security, along with multithreading benefits such as CPU utilization and responsiveness. It also covers the use of static initializer blocks, constants, enums, and the role of ORM and JPA in Java for database interactions. Additionally, it differentiates between @Controller and @RestController in web applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Java Encapsulation and Multithreading Guide

The document discusses key programming concepts including encapsulation, immutability, and security, along with multithreading benefits such as CPU utilization and responsiveness. It also covers the use of static initializer blocks, constants, enums, and the role of ORM and JPA in Java for database interactions. Additionally, it differentiates between @Controller and @RestController in web applications.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Incapsulation

[Link] - dasturdagi xatolikni debug qilish orqali topish oson


[Link] - get methodlarida obyekt field ining clone ni qaytarib yuboramiz,
set qilayotganda kirib keluvchi argumentning clone nini set qilamiz
[Link]

Static initializer block - static fieldlarga qiymat initialize qilish uchun.

Konstantalar – Enum va final keyword bilan elon qilingan tiplar

Enumda - qiymatlar oldindan belgilab quyilgan buladi

HEAD FIRST DESIGN PATTERN, 2ND EDITION -> design pattern uchun kitob

Multhreading - bitta process(application) da bir vaqtni o'zida bir nechta vazifani


bajarish.

Multithreading nima uchun kk ?


1. bitta cpu ni maksilmal foydalanish uchun.
2. responsiveness
3. fairness

Thread priotiteti 0 bulsa ham thread tuxtamaydi.


@Controller – html page qaytaradi
@RestController – data qaytaradi(masalan json data)

ORM - Object ga asoslangan bog’lanish. ORM – javadagi classlarni database dagi


tablelarga bo’glab beradigan mexanizmga ORM deyiladi. Javadagi malumotlarni
database ga , database dagi malumotlarni javadagi obyektlar ko’rinishiga o’girib
beradi. Javadagi class larni databasedagi table larga bo’glab berdigan mexanism
ga ORM deyiladi. Hibernate – ORM tool. Hibernate ORM ni implementatsiya
qilgan.

JPA(Java Persistence API) –ORM tool lar uchun qonun qoidalar to’plami.
Persistance class – Javadagi class qaysiki database dagi table bilan bo’glangan.

JPA – Application va ORM orasidagi abstract layer.

You might also like