What happens when the following code is compiled?

public class Performer {
    public static void main(String[] args) {
        if (args instanceof Object) { // 1 
            System.out.println("yes");
        } else {
            System.out.println("no");
        }
    }
}
Explanation
yes will be printed out since array is also Object
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback