nerdexam
Oracle

1Z0-803 · Question #26

A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the result?

The correct answer is A. Compilation fails.. The problem is noticed at build/compile time. At build you would receive an error required: int,int,int

Working with Methods and Encapsulation

Question

A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the result?

Options

  • ACompilation fails.
  • BThe third argument is given the value null.
  • CThe third argument is given the value void.
  • DThe third argument is given the value zero.
  • EThe third argument is given the appropriate false value for its declared type.
  • FAn exception occurs when the method attempts to access the third argument.

How the community answered

(33 responses)
  • A
    91% (30)
  • B
    3% (1)
  • E
    6% (2)

Explanation

The problem is noticed at build/compile time. At build you would receive an error required: int,int,int

Topics

#method invocation#method signature#compilation error#arguments

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice