About Question enthuware.ocpjp.v11.2.3648 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
maria_maria
Posts: 10
Joined: Wed Mar 03, 2021 5:39 am
Contact:

About Question enthuware.ocpjp.v11.2.3648 :

Post 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:

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

Tester
Posts: 34
Joined: Mon Oct 30, 2023 11:55 am
Contact:

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

Post by Tester »

Code: Select all

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

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Yes, what is your doubt?
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 21 guests