View the Exhibit to examine a Java source file.
You have the corresponding Java class file and you execute the command as follows:
SQL> CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
NAME ‘FormatCreditCardNo.formatCard()’;
Which statement is true about the command?
A.
It loads the Java class method into Oracle Database and publishes it.
B.
It publishes the Java class method, but the CCFORMAT PL/SQL procedure fails when it is executed.
C.
It creates the CCFORMAT PL/SQL subprogram without publishing, which can be used to invoke the Java class method.
D.
It publishes the Java class method and the CCFORMAT PL/SQL procedure invokes the Java class method when it is executed.
Explanation:
publishing a Java-ClassSQL> CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
NAME ‘FormatCreditCardNo.formatCard(java.lang.String[])’;
Isn’t there a problem that in PL/SQL we declare VARCHAR2 parameter, and in Java we have String[] ?
Isn’t String[] an array of strings and therefor TABLE OF VARCHAR2 in PL/SQL ?
B
NAME ‘FormatCreditCardNo.formatCard()’; no parameter set for java class