Re: About Question enthuware.ocpjp.v11.-2-.3630 :
Posted: Tue Apr 13, 2021 4:20 am
Hello, i'm pretty disapointed by this question
One of the expected right answer is : Three SQL statements are executed.
But the table schema is :
And the update statement query is:
This query use a wrong column name (TEACHERID != ID) so an sqlexception will be thrown on the first update preventing the execution of the third.
AM i right on this or am i missing something?
As a side note, the code used to prevent SPAM during the registration process does not make sense
You can't declare a avariable named "1" and "i" is unknown. Just a typo but a disturbing one during the registration process
One of the expected right answer is : Three SQL statements are executed.
But the table schema is :
Code: Select all
ID(int) NAME(varchar) SUBJECT(varchar)
Code: Select all
PreparedStatement insertPS = c.prepareStatement("insert into SUBJECT (NAME, TEACHERID) VALUES (?, ?)");
AM i right on this or am i missing something?
As a side note, the code used to prevent SPAM during the registration process does not make sense
Code: Select all
To help us prevent SPAM, tell us what will this code print?: int 1 = 10; System.out.println("hello"+i);: