exam questions

Exam 1z0-144 All Questions

View all questions & answers for the 1z0-144 exam

Exam 1z0-144 topic 1 question 30 discussion

Actual exam question from Oracle's 1z0-144
Question #: 30
Topic #: 1
[All 1z0-144 Questions]

Examine the following code that you plan to execute:

What correction should be performed in the above code?

  • A. The PROC2 procedure code should be defined in the package body.
  • B. The PROC3 procedure should be declared in the package specification.
  • C. The PROC3 procedure header should be declared at the beginning of the package body.
  • D. The variable x must be declared in the package body and removed from the specification,
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Naveen_2022
2 years, 10 months ago
LINE/COL ERROR ——– —————————————————————– 4/11 PLS-00323: subprogram or cursor ‘PROC2’ is declared in a package specification and must be defined in the package body
upvoted 1 times
...
Anubhav244
4 years, 4 months ago
Yes, A is the correct answer. Explanation - It is not a mandate to declare all the procedures/functions inside a package body in declarative section too. Whatever is declared in declarative section of a package declaration becomes public. i.e. accessible outside package also using <<package_name.procedure_name>>. However, the procedures/functions declared in the package specification/declarative part should be defined in package body otherwise it gives error procedure body missing.
upvoted 4 times
...
willjdp
4 years, 10 months ago
Could be A or B
upvoted 1 times
HexaDev
4 years, 10 months ago
i think only A, because in Package body we can write hidden subprograms, without specifying them in PACKAGE SPECIFICATION.
upvoted 7 times
...
...
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.

SaveCancel
Loading ...