DEV Community

Cover image for Variables
umida5
umida5

Posted on

Variables

                        Rules 
Enter fullscreen mode Exit fullscreen mode

int son; Declaration - e'lon qilish
son = 11; Assignment - qiymat o'zgartirish

int raqam = 15; Intialization - e'lon qilib srazu qiymat berish

int a,b,c,d,e; Bir xil tipdagi o'zgaruvchilarni 1 qatorda e'lon qilish mumkin emas.

int raqam = 5; O'zgaruvchiga 1 xil nom berish mumkin emas.

float harorat, int x = 1; 1 qatorda 1 nechta o'zgaruvchi ishlatib bo'lmaydi

                 Nomlash qoidalari
Enter fullscreen mode Exit fullscreen mode


1.Nomda alifbo harflari,raqamlar va undercore ishlatish mumkin
2.Nomning 1 chi belgisi raqam bo'la olmaydi
3.Nomda maxsus belgilar bo'lishi mumkin emas
4.Maxsus kalit so'zlardan nom sifatida foylalana olmaymiz

Casting rules
Katta harf va kichik harf b-n ishlash
Local o'zgaruvchilar cameLcase orqali yoziladi.
Propertylar,metod nomlari,class nomlari PascalCase orqali
yoziladi.
Constant qiymatga ega o'zgaruchilar UPPERCASE orqali yoziladi.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay