Question: 3. Read the following program and describe what the program does. Write comments in the program listing to follow to show that you understand
3. Read the following program and describe what the program does. Write comments in the program listing to follow "" to show that you understand this program. (20 pts) import java io.* import java.sql* public class Example ( public static void main(Ssring argst) throw SOLException, 10Exception ( try t Class forName"oracle jdbc.driver OracleDriver") catch (ClassNotFoundException ex) System.out printin"Driver could not be loaded") retum String url "jdbe oracle www.bookstore.com:3083": Connection con try f con DriveManagergetConnection(url, userld, password) String sqIQuery = SELECT isbn, title FROM Books WHERE publisher MIT Press PreparedStatement stmt con prepareStatement(sqlQuery) ResultSet rs stmt executeQuery(sqlQuery), String isbn, title System.out printlin"isbn title")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
