Oracle Certified Professional Java Se 11 Developer · Free Practice Question Medium

Question 11

Question ID: UKOCP28176


What are the security best practices related to native methods?

  • A Native methods should be declared as final
  • B Native methods should be declared as static
  • C Native methods should be declared private and a public wrapper method around native method should be provided
  • D Native methods should be declared as synchronized
Reveal correct answer

Correct answer: C

Explanation

UKOCP28176:

Check below link and section:

https://www.oracle.com/java/technologies/javase/seccodeguide.html

Guideline 5-3 / INPUT-3: Define wrappers around native methods

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need