Exam 1z0-808 All QuestionsBrowse all questions from this exam
Question 16

Given the code fragment from three files:

Which code fragment, when inserted at line 2, enables the code to compile?

    Correct Answer: E

    To compile the code, you need to import classes from both the 'sales' package and the 'sales.products' package. Specifically, 'SalesMan' is located in the 'sales' package and 'Product' is located in 'sales.products' package. Therefore, the correct code to insert at line 2 is 'import sales.*;' and 'import sales.products.*;'. This will ensure that both 'SalesMan' and 'Product' are available to the 'USMarket' class. The correct option is E.

Discussion
krkpnrOption: E

Correct E

DanielLeeeeOption: A

import sales.*; import sales.products.*; OR import sales.SalesMan; import sales.products.Product;

SamAruOption: E

Agreeed, Option E is correct!

PD1985Option: E

Answer is E, but there is a typo for last class. file name mentioned as Market.java however the class name is defined as USMarket.java.

Vicky_65Option: E

correct anser is E

andiksOption: C

Import sales* - Imports all classes in sales but sales itself. Correct answer is C

alexandrustefanescuOption: E

E ist correct!

KrokOption: E

Incorrect question: if class name of public class is USMarket then file can't have name Market.java If we rename public class or file - correct answer "E"

arjunrawatirissoftwareOption: E

Answer - E

fvelazqueznavaOption: E

E is the correct

dsmsOption: E

Correct - E

Ankit1010Option: E

E is the correct answer.

ddpkOption: E

Answer E

ddpkOption: C

Answer C

ddpk

Sorry it's answer E