expressions Flashcards

1
Q

expression

A

is combination of one or more operators and operands that usually performs calculation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

20/5
20.0/5
20/5.0
20.0/5.0

A

4

  1. 0
  2. 0
  3. 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

-/+

A

uniry or binary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

true or false

the assignment operator (=)has lower prcedence than any of arthmitic operators

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

the evoluation of particular expression can be shown using an ……………….

A

expresion tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

precdence page 106

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

((19+8)%3)-4) ;

(19(+8%)3-4);

A

not valid

not valid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how the compiler calculate this

count = count +1;

A

calculate this count +1

and then overwrite the old value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

increement(++) decrement–

A

without white space if there is white space then it is called string concatenation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

postfix and prefix

count ++.++count

A

in the first increase first

in the second increase after

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

total+=5

mean

A

total=total +5;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

assignment conversion

A

when a value of one type is assigned to anthor variable during the value is converted to the new type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

casting is the most general form of conversion in java

dollars =(int )money ;

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the cast operator has a higher precedence than the division operator

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

result =(float) total /count ;

the cast operators on the value of total not in the result of the division

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly