fork download
  1. class Ideone {
  2. public static void main (String[] args) throws Exception {
  3. System.out.println("8 / 16: " + (8 / 16));
  4. System.out.println("-8 / 16: " + (-8 / 16));
  5. System.out.println("8 >> 4: " + (8 >> 4));
  6. System.out.println("-8 >> 4: " + (-8 >> 4));
  7. }
  8. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
8 / 16:  0
-8 / 16: 0
8 >> 4:  0
-8 >> 4:  -1