fork(1) download
  1. import java.math.*;
  2.  
  3. class BadHash {
  4. public static void main(String args[]) {
  5. String s = "polygenelubricants";
  6. System.out.println("hashCode() = " + s.hashCode());
  7. System.out.println("abs(...) = " + Math.abs(s.hashCode()));
  8. }
  9. }
  10.  
Success #stdin #stdout 0.03s 4386816KB
stdin
Standard input is empty
stdout
hashCode()   = -2147483648
abs(...)     = -2147483648