Saturday, February 13, 2021

Java Programming New 22 Solved MCQ Question Answer

 Question: 1. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.

Option A. True.
Option B. False.

Question: 2. Connection, Statement are interfaces and ResultSet is a class.
Option A. True.
Option B. False.

Question: 3. JdbcOdbcDriver is an object of Object class
Option A. True
Option B. False

Question: 4. class.forName(...) creates an instance of java ODBC driver
Option A. True
Option B. False

Question: 5. Submit button always fires doPost(...)
Option A. True
Option B. False

Question: 6. We can add more than one class(es) at the time of compilation Java Beans.
Option A. True.
Option B. False.

Question: 7. In RMI before running the client program we must start RMI Registry.
Option A. True.
Option B. False.

Question: 8. An EJB is a server-side component that encapsulates the business logic of an application
Option A. True
Option B. False

Question: 9. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
Option A. True
Option B. False

Question: 10. In RMI we invoke client method from remote server
Option A. True
Option B. False

Question: 11. In order to connect to a database through java program we must create _______-
Option A. Connection, Statement, ResultSet
Option B. Connection, ResultSet
Option C. Statement< ResultSet
Option D. Connection, Statement

Question: 12. executeUpdate(------------) returns ___________
Option A. Nothing
Option B. Returns a ResultSet object
Option C. Returns an integer value to show the no. of updated rows
Option D. None of the above.

Question: 13. executeUpdate automatically updates data because___________
Option A. auto commit is on, by default
Option B. It performs a hidden commit statement as well
Option C. Does not commit
Option D. None of the above.

Question: 14. In a single Servlet class we can use____________
Option A. doGet(...) method only
Option B. doPost(...) method only
Option C. doGet(...) method and doPost(...) method both at a time.
Option D. Either 'a' or 'b'

Question: 15. putValue(...) method takes _____________________-
Option A. Two arguments of object type
Option B. First one is of a character type and second one is of an object type
Option C. First one is of an object type and second one is of a character type
Option D. None of the above.

Question: 16. Servlet has ___________
Option A. init method
Option B. doGet(------) method
Option C. All of the above methods.

Question: 17. Servlet can have ___________
Option A. get method and post method
Option B. get method or post method
Option C. Either of the above

Question: 18. JSP files creates ________________
Option A. html files
Option B. html files and java files
Option C. java files and class files
Option D. None of the above.

Question: 19. A JSP file can be stored_________________
Option A. With the extension .jsp in servlets folder of the jws
Option B. With the extension .html in public_html folder of the jws
Option C. With the extension .jsp in public_html folder of the jws
Option D. None of the above.

Question: 20. The name of the RMI compiler is ___________
Option A. rmicom
Option B. rmic
Option C. jrmi
Option D. none of the above

Question: 21. EJBs can be of the following type(s)
None of the above
Option A. Entity Bean
Option B. Session Bean
Option C. Message-driven bean
Option D. All of the above

Question: 22. Session bean
Option A. Represents a single client inside the application server
Option B. Can not be shared
Option C. Is not persistent
Option D. Satisfies all of the above conditions

Answer Sheet

1B
2B
3B
4A
5B
6A
7A
8A
9B
10B
11D
12C
13A
14C
15A
16C
17C
18C
19C
20B
21D
22D

1 comment:

  1. The first sportsbook in the US to open in - Jeopardy
    The first sportsbook in the US to 제주 출장마사지 open 공주 출장마사지 in Las Vegas. The first sportsbook in the US to open in Las Vegas. The 김포 출장마사지 first sportsbook in the US to open in Las Vegas. The 군산 출장샵 first sportsbook 의정부 출장샵 in the

    ReplyDelete