Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Dear Tutor I need answer urgently for this question because I have Test now in 2 hour. I will give the best rate for you.
Dear Tutor I need answer urgently for this question because I have Test now in 2 hour. I will give the best rate for you. Thank you Course: Java Programming
Part I: Multiple Choices. (10 marks) 1. is/are the component(s) used to connect to a database and then build a java program that uses SQL commands to communicate with a relational database. I. JDBC API II. JDBC Driver Manager III. JDBC Test Suite IV. JDBS-ODBC Bridge A. I and II B. II and Ill C. I only D. II only 2. How can you retrieve information from a Resultset? A. By invoking the method get(..., String type) on the Resultset, where type is the database type B. By invoking the method get(..., Type type) on the Resultset, where Type is an object which represents a database type C. By invoking the method getValue(...), and cast the result to the desired Java type. D. By invoking the special getter methods on the Resultset: getString(...), getInt (...), getDouble(...),-.. 3. Assume PreparedStatement (ps) is declared and initialized to execute the following SQL statement: "insert into food (foodname, type, meal, price) values (?, ?, ?, ?)" Which of the following statement is INCORRECT for setting values for placeholders? A. ps . setString(0, "Asam Pedas") ; B. ps. setString(1, "Carbonara"); C. ps . setInt(2, "Western"); D. ps. setString(3, "Lunch"); 4. Which resources have their close () method called when this code is executed? public static void runQuery (Connection conn) throws SQLExceptionf try (Statement stmt = conn . createStatement( ) ) { Resultset rs = stmt . executeQuery ("select * from car_owner") ; rs . next(); A. No close ( ) methods are called. B. Only Statement. C. Only Statement and Connection. D. Only Statement and ResultSet.5. are associated with database transactions and may provide data access to multiple users. A. Message-driven beans B. Entity beans C. Session beans D. Stateless beans 6. Which of the following attribute is required for pointing to a form's name attribute when usingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started