Advertisement
|
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?
Read: Friday Java Quiz: Know Your java.lang Classes