Professional Documents
Culture Documents
Data Types and Variables
Data Types and Variables
Quiz 2
Declare an int variable with name and value 20
y
int 20
y
Quiz 3
int a to
17 127
int 6 209
Quiz6
System out pointer a
senor
int a 109
Quiz 7
int a 20 172
int a 30 error
System out pointer a
Quiz 8
int 2 20 DE
system out point n
2 409
System out pointer n
204400
Quiz 9
int a to
Matt
int b 205operator
assignment
afoot 309 g
System out pointenla
so
variable naming hates
2 First letter
of the variable name can't be
number
How
many of above are correct variable names
Quiz 11
int y to t
int I ans 3
ang 209
int n a 30 xx
int 2 45 t
y
How
many of above are correct variable names
Quiz 12
int Static bog
Range capacity
byte 2 to 27 1 L 128,1273
Short 215 to 25 1 L 32768 32767316
int 23 to 231 1 1 n 332
203 to 263 1 L 364
long
Exact explanation
of how
we
got
this range is in BITS Class
The default value is int in Java
Typecasting
5kg
Ei 25kg
00
5kg
0
25kg
80
7kg 88
0000 00 0000
no
25kg no
kg 25kg kg
15kg
0000 00 ooo Ég
no
ey
25kg roig 25kg kg
I 1
implicit explicit
Cautomatic
forced
end int n too
long y n implicit
Quiz 14
enggitecasting
long 2 100000
int int n
int y 2 explicit y
System outpointer y
Gentoo
Quiz 158
as to't long
long I
int int
og aint b a
Quiz 17
input 30
Scanner son new Scanner system.in error
int n sch nent Intl
Quiz 17
input 30
Scanner son new Scanner Gystem.in
630
input 24 30
Scanner son new Scanner Gystem.in
int
int
n sch nent Intl
son nent Intl
B
y
systemoutpointing
G 224