Вы находитесь на странице: 1из 9

‫اﻟﻜﻠﻤﺎت اﻟﻤﺤﺠﻮزة ﻓﻲ اﻟﻠﻐﺔ‬

a bs tr a c t as ba s e bool br e a k byte ca se

c a tc h c ha r c he c k e d c la s s c ons t c ontinue de c im a l

de fa ult de le ga te do double e ls e e num e ve nt

e x plic it e x te r n fa ls e fina lly fix e d floa t for

for e a c h goto if im plic it in in int


genericmodifier

inte r fa c e inte r na l is loc k long na m e s pa c e ne w

null obje c t ope r a tor out out ove r r ide pa r a m s


genericmodifier

pr iva te pr ote c te d public r e a donly re f r e tur n s byte

s e a le d s hor t s ize of s ta c k a lloc s ta tic s tr ing s tr uc t

s witc h this thr ow tr ue tr y type of uint

ulong unc he c k e d uns a fe us hor t us ing vir tua l void

vola tile while

moheman.tariq@gmail.com 1
‫اﻟﻤﺘﻐﻴﺮات ﻓﻲ اﻟﻠﻐﺔ‬

T ype R epresents R ange D efa u lt


V a lu e

bool B oole a n va lue T r ue or Fa ls e Fa ls e

byte 8 -bit uns igne d inte ge r 0 to 2 5 5 0

c ha r 1 6 -bit Unic ode c ha r a c te r U + 0 0 0 0 to U + ffff '\0 '

de c im a l 1 2 8 -bit pr e c is e de c im a l va lue s (-7 .9 x 1 0 2 8 to 7 .9 x 1 0 2 8 ) / 1 0 0 to 2 8 0 .0 M


with 2 8 -2 9 s ignific a nt digits

double 6 4 -bit double -pr e c is ion floa ting + / − 5 .0 x 1 0 -3 2 4 to + / − 1 .7 x 1 0 3 0 8 0 .0 D


point type

floa t 3 2 -bit s ingle -pr e c is ion floa ting -3 .4 x 1 0 3 8 to + 3 .4 x 1 0 3 8 0 .0 F


point type

int 3 2 -bit s igne d inte ge r type -2 ,1 4 7 ,4 8 3 ,6 4 8 to 2 ,1 4 7 ,4 8 3 ,6 4 7 0

long 6 4 -bit s igne d inte ge r ty pe -9 ,2 2 3 ,3 7 2 ,0 3 6 ,8 5 4 ,7 7 5 ,8 0 8 to 0L


9 ,2 2 3 ,3 7 2 ,0 3 6 ,8 5 4 ,7 7 5 ,8 0 7

s byte 8 -bit s igne d inte ge r ty pe -1 2 8 to 1 2 7 0

s hor t 1 6 -bit s igne d inte ge r ty pe -3 2 ,7 6 8 to 3 2 ,7 6 7 0

uint 3 2 -bit uns igne d inte ge r ty pe 0 to 4 ,2 9 4 ,9 6 7 ,2 9 5 0

ulong 6 4 -bit uns igne d inte ge r ty pe 0 to 1 8 ,4 4 6 ,7 4 4 ,0 7 3 ,7 0 9 ,5 5 1 ,6 1 5 0

us hor t 1 6 -bit uns igne d inte ge r type 0 to 6 5 ,5 3 5 0

moheman.tariq@gmail.com 2
‫ﺗﺤﻮﻳﻞ اﻟﻤﺘﻐﻴﺮات‬

S r.N o M et ho ds & D es cr ipt io n

1 T o B o o lea n

C onve r ts a type to a B oole a n va lue , whe r e pos s ible .

2 T oB yte

C onve r ts a type to a byte .

3 T oChar

C onve r ts a type to a s ingle Unic ode c ha r a c te r , whe r e pos s ible .

4 T o D a t eT im e

C onve r ts a type integerorstringtype to da te -tim e s tr uc tur e s .

5 T o D ecim a l

C onve r ts a floa ting point or inte ge r ty pe to a de c im a l type .

6 T o D o u ble

C onve r ts a type to a double ty pe .

7 T o In t 1 6

C onve r ts a type to a 1 6 -bit inte ge r .

8 T o In t 3 2

C onve r ts a type to a 3 2 -bit inte ge r .

9 T o In t 6 4

C onve r ts a type to a 6 4 -bit inte ge r .

10 T oS byte

C onve r ts a ty pe to a s igne d byte ty pe .

11 T o S in gle

C onve r ts a type to a s m a ll floa ting point num be r .

12 T o S t r ing

C onve r ts a ty pe to a s tr ing.

moheman.tariq@gmail.com 3
‫ﺗﺤﻮﻳﻞ اﻟﻤﺘﻐﻴﺮات‬

S r.N o M et ho ds & D es cr ipt io n

13 T oT ype

C onve r ts a type to a s pe c ifie d ty pe .

14 T o UIn t 1 6

C onve r ts a type to a n uns igne d int ty pe .

15 T o UIn t 3 2

C onve r ts a ty pe to a n uns igne d long ty pe .

16 T o UIn t 6 4

C onve r ts a type to a n uns igne d big inte ge r .

moheman.tariq@gmail.com 4
‫اﻟﻌﻤﻠﻴﺎت اﻟﺮﻳﺎﺿﻴﺔ‬

Operator D es cr ipt io n E x a m ple

+ A dds two ope r a nds A + B = 30

- S ubtr a c ts s e c ond ope r a nd fr om the fir s t A - B = -1 0

* Multiplie s both ope r a nds A * B = 200

/ D ivide s num e r a tor by de -num e r a tor B /A= 2

% Modulus Ope r a tor a nd r e m a inde r of a fte r a n B % A= 0


inte ge r divis ion

++ Inc r e m e nt ope r a tor inc r e a s e s inte ge r va lue by one A+ + = 11

-- D e c r e m e nt ope r a tor de c r e a s e s inte ge r va lue by A -- = 9


one

‫ﻋﻤﻠﻴﺎت اﻟﻤﻘﺎرﻧﺔ‬

Operator D es cr ipt io n E x a m ple

== C he c k s if the va lue s of two ope r a nds a r e e qua l or A == B is not tr ue .


not, if ye s the n c ondition be c om e s tr ue .

!= C he c k s if the va lue s of two ope r a nds a r e e qua l or A ! = B is tr ue .


not, if va lue s a r e not e qua l the n c ondition be c om e s
tr ue .

> C he c k s if the va lue of le ft ope r a nd is gr e a te r tha n A > B is not tr ue .


the va lue of r ight ope r a nd, if y e s the n c ondition
be c om e s tr ue .

< C he c k s if the va lue of le ft ope r a nd is le s s tha n the A < B is tr ue .


va lue of r ight ope r a nd, if ye s the n c ondition
be c om e s tr ue .

>= C he c k s if the va lue of le ft ope r a nd is gr e a te r tha n A >= B is not tr ue .


or e qua l to the va lue of r ight ope r a nd, if y e s the n
c ondition be c om e s tr ue .

<= C he c k s if the va lue of le ft ope r a nd is le s s tha n or A <= B is tr ue .


e qua l to the va lue of r ight ope r a nd, if y e s the n
c ondition be c om e s tr ue .

moheman.tariq@gmail.com 5
‫اﻟﻌﻤﻠﻴﺎت اﻟﻤﻨﻄﻘﻴﺔ‬

Operator D es cr ipt io n E x a m ple

&& C a lle d Logic a l A ND ope r a tor . If both the ope r a nds A & & B is fa ls e .
a r e non ze r o the n c ondition be c om e s tr ue .

|| C a lle d Logic a l OR Ope r a tor . If a ny of the two A | | B is tr ue .


ope r a nds is non ze r o the n c ondition be c om e s tr ue .

! C a lle d Logic a l NOT Ope r a tor . Us e to r e ve r s e s the ! A & & B is tr ue .


logic a l s ta te of its ope r a nd. If a c ondition is tr ue
the n Logic a l NOT ope r a tor will m a k e fa ls e .

moheman.tariq@gmail.com 6
‫ﺟﻤﻞ اﺗﺨﺎذ اﻟﻘﺮار‬

‫ﺟﻤﻞ اﻟﺸﺮﻃﻴﺔ‬

if(boolean_expression)
{
/* statement(s) will execute if the boolean expression is true */
}

if(boolean_expression)
{
/* statement(s) will execute if the boolean expression is true */
}
else
{
/* statement(s) will execute if the boolean expression is false */
}

if( boolean_expression 1)
{
/* Executes when the boolean expression 1 is true */
if(boolean_expression 2)
{
/* Executes when the boolean expression 2 is true */
}
}

moheman.tariq@gmail.com 7
‫ﺟﻤﻞ اﺗﺨﺎذ اﻟﻘﺮار‬

‫اﻟﻌﺎﻣﻞ‬

Exp1 ? Exp2 : Exp3;

‫اﻻﻧﺘﻘﺎل‬

switch(expression) {
case constant-expression :
statement(s);
break; /* optional */
case constant-expression :
statement(s);
break; /* optional */

/* you can have any number of case statements */


default : /* Optional */
statement(s);
}

moheman.tariq@gmail.com 8
‫ﺟﻤﻞ اﻟﺘﻜﺮار‬

for ‫ﺟﻤﻠﺔ‬

for ( init; condition; increment )


{
statement(s);
}

while ‫ﺟﻤﻠﺔ‬

do
{
statement(s);

}while( condition );

‫ﺑﻌﺾ اواﻣﺮ ﺟﻤﻞ اﻟﺘﻜﺮار‬

break;
continue;

moheman.tariq@gmail.com 9

Вам также может понравиться