Java Puzzlers University of Pennsylvaniajava解惑宾夕法尼亚大学.pptVIP

  • 6
  • 0
  • 约2.75千字
  • 约 14页
  • 2017-03-07 发布于上海
  • 举报

Java Puzzlers University of Pennsylvaniajava解惑宾夕法尼亚大学.ppt

Java Puzzlers University of Pennsylvaniajava解惑宾夕法尼亚大学

Java Puzzlers From the book Java Puzzlers by Joshua Bloch and Neal Gafter Oddity The following method tests whether its argument is odd: public static boolean isOdd(int i) { return i % 2 == 1; } Does it work? It gives the correct answer for ? of the integers Making change public class Change { public static void main(String[] args) { System.out.println(2.00 - 1.10); } } 0.8999999999999999 Long Division public class LongDivision { public static void main(String[] args) { final long MICROS_PER_DAY = 24 * 60 * 60 * 1000 * 1000; final long MILLIS_PER_DAY

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档