What is the result of the following program execution?

import static java.lang.Math.*;

public class StartClass {
    public static void main(String[] args) {
        System.out.println(max(1, 2)); 
    }
}
Explanation
import static imports not only classes but also their static fields and methods
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback