What will be the result of compiling and running the following code?
import static java.lang.Byte.*;
import static java.lang.Integer.*;

public class Test {
    public static void main(String[] args) {
        System.out.println(MAX_VALUE);
    }
}
Explanation
MAX_VALUE is in Both the classes(Byte and Integer), So Compiler is confused about which class MAX_VALUE is to reference.

Follow CodeGalaxy

Mobile Beta

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