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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs