Model 1: Basic Java Programming - Arithmetic expressions and operators Flashcards

1
Q

Integer and floating point division#

There are two types of division

A
  • Integer division: takes two integers and evaluates to an integer.
  • Floating-point division: takes two floating-point numbers (numbers with a decimal point) and evaluates to a floating-point number.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Typecasting operators#

A cast operator is written using parentheses and

A

the name of the target type, and precedes the value to be cast.

For example, (double) 5 yields the value 5.0.

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

post-increment operator

A

x++ produces a value: the value of x before adding 1 to x.

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

pre-increment operator

A

++x increments the variable first, and then produces the value

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