maldanam (2) [Avatar] Offline

I think question 9 in chapter 1 is not answered correctly. I think the correct answer is a) instead of c) because de courseName attribute is declared with package visibility, and both declared classes belong to the same package (the default package).

Could you confirm I am right, please ?
maldanam (2) [Avatar] Offline
Sorry, the question is answered correctly.

Which of the following statements will be true if the variable courseName is defined as a private variable?

And the correct answer is :

c) class EJavaGuru won’t compile.