Tag Archives: Main

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

Given:Which two independent changes will make the Main class compile? (Choose two.) A. Move the entire Student class declaration to a separate Java file, Student.java. B. Change line 2 to public Student(String classname). C. Change line 1 to public class Student {. D. Change line 3 to Student student = new Student(“Biology”);. E. Change line 1 to static… Read More »

Which command line runs the main class com.acme.Main from the module com.example?

Which command line runs the main class com.acme.Main from the module com.example? A. java -classpath com.example.jar -m com.example/com.acme.Main B. java –module-path mods -m com.example/com.acme.Main C. java –module-path mods com.example/com.acme.Main D. java -classpath com.example.jar com.acme.Main Correct Answer: A

Given an application with a main module that has this module-info.java file: (Exhibit) Which two are

Given an application with a main module that has this module-info.java file:Which two are true? (Choose two.) A. An implementation of country.countryDetails can be added to the main module. B. To compile without an error, the application must have at least one module in the module source path that provides an implementation of country.CountryDetails. C. To run without… Read More »