Arithmetic and Logical Operators Practice Problems


  1. Is the following statement valid: int x = 34.7;

  2. Is the following statement valid: double y = 12;

  3. Is the following statement valid: boolean q = 17 < 25;

  4. Evaluate the following Java expression: 9 - 15 * 6 / 11 + 4

  5. Evaluate the following Java expression: 75 % 7

  6. What are the three logical operators?

  7. What would the following boolean expression evaluate to? ((3<5) && !(1>14) && (-5<-15)) || ((6==6) && !(2==2))