Page 1 of 1

About Question enthuware.ocpjp.v11.2.3648 :

Posted: Wed Apr 14, 2021 10:00 am
by maria_maria

Code: Select all

Given:
    1.A table has been created in the DB as follows:
    CREATE TABLE NAMES(FNAME varchar(20),LNAME varchar(20));
    2.A stored procedure has also been created in the DB as follows:
    CREATE PROCEDURE insert_name(GIVENNAME IN VARCHAR,SURNAME IN VARCHAR)as 
    BEGIN 
    insert into NAMES(FNAME,LNAME)values(SURNAME,GIVENNAME);
    END;
Consider the following Java code:
        try(Connection c=ds.getConnection();var stmt=c.prepareCall("{call insert_name(?,?)}")){ //1       
                stmt.setObject("surname","Doe",JDBCType.VARCHAR); //2      
                stmt.setObject("GIVENNAME","Jane",JDBCType.VARCHAR); //3     
                stmt.execute(); //4 }
What will happen when the above code is complied and run?
I've read that CallableStatement has been removed from Java SE 11 Developer Certification 1Z0-819.
Are people getting this question on the exam and most importantly, should I take a look over it? :shock:

Re: About Question enthuware.ocpjp.v11.2.3648 :

Posted: Wed Apr 14, 2021 10:05 am
by admin
The problem with this exam is that there is a lack of absolute clarity on what is included an what is not. Earlier people thought CallableStatement was not included but in the past few months, we have seen people getting questions on CallableStatement.

Another issue is that the number of questions that you get in the exam is only 50, which is too few to cover all the topics covered in the exam objectives. So, it is possible for one candidate to not get even a single question on several topics.

Therefore, we would suggest that if you have time, then go through separate reading material on CallableStatement, otherwise, just go through the questions and explanations given in our question bank. That will cover what you need to know for the exam.

Re: About Question enthuware.ocpjp.v11.2.3648 :

Posted: Mon Jan 08, 2024 3:44 pm
by Tester

Code: Select all

stmt.registerOutParameter(3, JDBCType.VARCHAR); //registering the out parameter at index 3
Is it correct example?

Re: About Question enthuware.ocpjp.v11.2.3648 :

Posted: Mon Jan 08, 2024 11:44 pm
by admin
Yes, what is your doubt?