C is the only correct answer, beaucse line n1 is inside the class "Messenger", it will call the local class function of the instance. So Basicalle "writeMsg();" in position n1 is a short version of "this.writeMsg();".
C is the correct answer because, a method can access another method within a class directly. writeMsg() is an instance method and not a static method.
B is incorrect because Messenger.writeMsg() implies as if writeMsg() is a static method. In order B to be correct, keyword "static" should be explicitly declared in writeMsg() method.
Se puede llamar el un método publico dentro de otro método dentro de la misma clase
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-811 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
PLSnoob
4 months agofacudtd
5 months, 2 weeks agoelectri
6 months, 2 weeks agosupercoder
8 months agoRoss_2023
9 months, 2 weeks agofalchetto
1 year, 1 month agoOlha88
1 year, 3 months agoyonathanmartinez
1 year, 6 months ago