Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed
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 using ? A. scope B. param C. property D. id 7. Stateful session bean is an EJB that A. invokes a method on the bean B. deployed with the declarative attribute "stateless" C. maintain the state of the conversation for more than one client D. provide the state of the conversation between the client and itself 8. Which of the following is used to create an instance for a JavaBean component? A. B. C. D. 9. Which file consist of Java EE-compliant web application? A. JAR B. EAR C. WAR D. RAR 10. Which object is used to forward the request processing from one servlet to another? A. ServletConfig B. RequestDispatcher C. ResponseDispatcher D. ResponseRedirect

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions