About Question 30 in com.enthuware.jfcja.v8.2.458 :

Oracle Certified Foundations Associate Java Certification Questions and Discussion
1Z0-811

Moderator: admin

Post Reply
tntbabin@gmail.com
Posts: 1
Joined: Sun Aug 21, 2022 12:46 pm
Contact:

About Question 30 in com.enthuware.jfcja.v8.2.458 :

Post by tntbabin@gmail.com »

It says that importing java.lang.* is correct as it will not cause an error even if it is unnecessary.
However, it also claims that importing java.util.* is incorrect. Does this cause an error? If, not why would one be the correct answer and not the other.

Any clarification is appreciated!

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question 30 in com.enthuware.jfcja.v8.2.458 :

Post by admin »

It is true that importing the util package will not cause an error but it is a wrong option because this import is not relevant in the given situation. The Math class is in java.lang package, so importing java.lang is ok but importing java.util is not ok (although no compilation error but is logically incorrect).

But I agree with you that this option is not good. Will update the question accordingly.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

zak.nk
Posts: 5
Joined: Fri Apr 07, 2023 7:53 am
Contact:

Re: About Question 30 in com.enthuware.jfcja.v8.2.458 :

Post by zak.nk »

admin wrote:
Mon Oct 10, 2022 12:26 am
It is true that importing the util package will not cause an error but it is a wrong option because this import is not relevant in the given situation. The Math class is in java.lang package, so importing java.lang is ok but importing java.util is not ok (although no compilation error but is logically incorrect).

But I agree with you that this option is not good. Will update the question accordingly.
thank you for your feedback!
Well, it seems you haven't updated the question... I got this one right by guessing the "most correct" the first time I took it, and wrong today after retaking because I just didn't read after I selected 2 options that definitely met the condition of "what CAN be inserted in lines //1 and //2?"

If the question was at least "should be inserted," it would make you at least check all the answers as it hints at the fact that maybe you shouldn't import an entire package that you are not using at all.

Thanks.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question 30 in com.enthuware.jfcja.v8.2.458 :

Post by admin »

Definitely fixed now in v 1.12.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests