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));
As of Java release 1.4 assert is a keyword, and may not be used as an identifier.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes