nerdexam
Oracle

1Z0-899 · Question #62

Given the function invocation expression ${my:reverse("42")}, and that the function reverse is mapped into a Java method called reverse, which two are valid signatures for the Java method reverse?…

The correct answer is C. public static int reverse(String val) D. public static String reverse(int val) D. private static double reverse(double val). See the full explanation below for the reasoning.

Question

Given the function invocation expression ${my:reverse("42")}, and that the function reverse is mapped into a Java method called reverse, which two are valid signatures for the Java method reverse? (Choose two.)

Options

  • Apublic int reverse(String val)
  • Bpublic String reverse(String val)
  • Cpublic static int reverse(String val) D. public static String reverse(int val)
  • Dprivate static double reverse(double val)
  • Epublic int reverse(String value, String name)
  • Fpublic static int reverse(int value, String name)

How the community answered

(52 responses)
  • A
    10% (5)
  • B
    6% (3)
  • C
    79% (41)
  • E
    4% (2)
  • F
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice