<< Java News Brief (JNB): Why Scala? | Home | NetBeans 6.0: A Week Later, And A Much Better Story >>

Friday Java Quiz: Know Your java.lang Classes

This weeks Friday Java Quiz is provided by Brian Coyner.

Q: What does the following Java program print:

public class Foo {
  public static void main(String[] args) {
    System.out.println(Math.min(Double.MIN_VALUE, 0.0d));
    System.out.println(Math.min(Integer.MIN_VALUE, 0));
  }
}

Like always, answer the question without the help of actually compiling and running the class or looking anything up in a book or on the Google.

Bonus Q: Is

-1

an integer literal?

Tags :


Re: Friday Java Quiz: Know Your java.lang Classes

Interesting, I've never done much with double. I just put up a few inspired by these here.

Add a comment Send a TrackBack