Created by Guilherme Benner Martelli
over 7 years ago
|
||
Question | Answer |
addition operator | + |
subtraction operator | - |
not operator | ! |
multiplication operator | * |
division operator | / |
modulus operator | % |
Shift left operator | << |
Shift Right Operator | >> |
zero fill shift right operator | >>> |
What is the data type of x*y? int x = 1; long y = 33; | long |
What is the data type of x+y? double x = 39.21; float y = 2.1; | Does not compile! |
What is the data type of x+y? double x = 39.21; float y = 2.1f; | double |
What is the data type of x/y? short x = 10; short y = 3; | Int |
What is the data type of x*y/z? short x = 14; float y = 13f; double z = 30; | Double |
boolean z != 0; | Does not compile. |
int x = 3; int y = ++x*5/x--+--x; x? y? | x=2; y=7; y = 4*5/4+2; |
Want to create your own Flashcards for free with GoConqr? Learn more.