Exam 1z0-816 All QuestionsBrowse all questions from this exam
Question 27

Given:

Which two independent changes will make the Main class compile? (Choose two.)

    Correct Answer: B, E

    To make the Main class compile, two independent changes are necessary. First, changing line 2 to public Student(String classname) allows the Student constructor to be accessible from the main method outside the Student class. Second, changing line 1 to static class Student { allows the Student class to be used in a static context within the main method. These changes ensure that the Student class and its constructor are correctly accessible and usable within the Main class.

Discussion
Sa16253748596Options: AE

A,E is true