Tag Archives: Java

Given: (Exhibit) Which three actions implement Java SE security guidelines? (Choose three.)

Given:Which three actions implement Java SE security guidelines? (Choose three.) A. Change line 2 to protected volatile String[] names;. B. Change line 2 to private final String[] names;. C. Change line 3 to private Secret(String[] names) {. D. Change line 7 to return names.clone();. E. Change line 4 to this.names = names.clone();. F. Change line 6 to public… Read More »

Which two statements are correct about modules in Java? (Choose two.)

Which two statements are correct about modules in Java? (Choose two.) A. module-info.java can be placed in any folder inside module-path. B. By default, modules can access each other as long as they run in the same folder. C. java.base exports all of the Java platforms core packages. D. A module must be declared in module-info.java file. E.… Read More »

Which two statements are true about Java modules? (Choose two.)

Which two statements are true about Java modules? (Choose two.) A. Any named module can directly access all classes in an automatic module. B. Modular jars loaded from –module-path are automatic modules. C. Modular jars loaded from -classpath are automatic modules. D. If a package is defined in both the named module and the unnamed module, then the… Read More »

A company has an existing sales application using a Java 8 jar file containing packages: com.company.customer;

A company has an existing sales application using a Java 8 jar file containing packages:com.company.customer;com.company.customer.orders;com.company.customer.info;com.company.sales;com.company.sales.leads;com.company.sales.closed;com.company.orders;com.company.orders.pending;com.company.orders.shipped.To modularize this jar file into three modules, customer, sales, and orders, which module-info.java would be correct?A)B)C)D) A. Option A B. Option D C. Option C D. Option B Correct Answer: C

Which two statements are correct about modules in Java? (Choose two.)

Which two statements are correct about modules in Java? (Choose two.) A. A module must be declared in module-info.java file. B. java.base exports all of the Java platforms core packages. C. module-info.java can be placed in any folder inside module-path. D. By default, modules can access each other as long as they run in the same folder. E.… Read More »

Which three statements are true about the structure of a Java class? (Choose three.)

Which three statements are true about the structure of a Java class? (Choose three.) A. A public class must have a main method. B. A method can have the same name as a field. C. A class can have overloaded static methods. D. The methods are mandatory components of a class. E. The fields need not be initialized… Read More »