<< IntelliJ IDEA License Give away At The JUG | Home | Friday Java Challenge: Write A Regular Expression Parser >>

Friday Java Quiz: What Is Integer.TYPE?

Of course you know what Integer.TYPE is. Now fill in the blank in the following class:

public class Foo {
  public static void main(String[] args) {
    System.out.println(________ == Integer.TYPE);
  }
}
with something other than Integer.TYPE so that the program will print "true" when compiled and run.

Tags :


Re: Friday Java Quiz: What Is Integer.TYPE?

here's my entry for _____ (new String("")).getClass().getDeclaredMethod("hashCode").getReturnType() Mike ps. Here is a Groovy one-liner (which is different) groovy.bat -e " println 0.getClass().TYPE == Integer.TYPE "

Re: Friday Java Quiz: What Is Integer.TYPE?

int.class?

Re: Friday Java Quiz: What Is Integer.TYPE?

inc.class

Re: Friday Java Quiz: What Is Integer.TYPE?

eu beat me.

Re: Friday Java Quiz: What Is Integer.TYPE?

There are already correct answers and because it is Friday, I will have this answer for fun
true || null

Re: Friday Java Quiz: What Is Integer.TYPE?

Should have anticipated this one. I was at the security talk where SQL injection was the topic. This also work:

true); //

Add a comment Send a TrackBack