What will the following code print out:

public class Comparation {
    public static Boolean assert(boolean bool) {
        return bool;
    }
    public static void main(String[] args) {
        int i1 = 1;
        Integer i2 = 1;
        System.out.println("assert=" + assert(i1 == i2));
    }
}
Explanation
As of Java release 1.4 assert is a keyword, and may not be used as an identifier.
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback