A developer is creating a custom method. This method must return a String property y from child x. the method must use only Sling APIs. How should the developer retrieve property y of node x, and node x may or may NOT exist? A. B. C. D.
Answer: B
--------------------------------------------------------------
A: will cause nullpointer, hence wrong
C: getProperties return PropertyIterator , hence wrong
D: node does not have method getValueMap(), hence wrong
B: should have ValueMap map = x.getValueMap();
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.
chunpin
4 years, 2 months agokasyap1125
4 years, 4 months agopkg82
4 years, 8 months agoheenamadan
4 years, 8 months ago