InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Is design pattern a logical concept.(a) True(b) FalseThe question was asked by my college director while I was bunking the class.The query is from Design Patterns topic in division Java Beans & JDBC of Java |
|
Answer» CORRECT choice is (a) True Easiest EXPLANATION: DESIGN PATTERN is a LOGICAL concept. Various classes and frameworks are provided to enable users to implement these design patterns. |
|
| 2. |
What does MVC pattern stands for?(a) Mock View Control(b) Model view Controller(c) Mock View Class(d) Model View ClassI got this question during an online exam.The doubt is from Design Patterns in division Java Beans & JDBC of Java |
|
Answer» Correct answer is (b) Model view Controller |
|
| 3. |
Which design pattern represents a way to access all the objects in a collection?(a) Iterator pattern(b) Facade pattern(c) Builder pattern(d) Bridge patternThe question was asked in an international level competition.My question is from Design Patterns in chapter Java Beans & JDBC of Java |
|
Answer» Right option is (a) ITERATOR pattern |
|
| 4. |
Which design pattern suggests multiple classes through which request is passed and multiple but only relevant classes carry out operations on the request?(a) Singleton pattern(b) Chain of responsibility pattern(c) State pattern(d) Bridge patternThis question was addressed to me in final exam.The query is from Design Patterns topic in section Java Beans & JDBC of Java |
|
Answer» The CORRECT choice is (b) CHAIN of RESPONSIBILITY pattern |
|
| 5. |
Which of the below is not a valid design pattern?(a) Singleton(b) Factory(c) Command(d) JavaI got this question in semester exam.My question is based upon Design Patterns in section Java Beans & JDBC of Java |
|
Answer» The correct answer is (d) Java |
|
| 6. |
Which design pattern ensures that only one object of particular class gets created?(a) Singleton pattern(b) Filter pattern(c) State pattern(d) Bridge patternThis question was addressed to me during an interview.Query is from Design Patterns topic in section Java Beans & JDBC of Java |
|
Answer» Right answer is (a) Singleton pattern |
|
| 7. |
Which design pattern provides a single class which provides simplified methods required by client and delegates call to those methods?(a) Adapter pattern(b) Builder pattern(c) Facade pattern(d) Prototype patternThe question was asked in an interview for job.I would like to ask this question from Design Patterns topic in portion Java Beans & JDBC of Java |
|
Answer» The correct choice is (c) Facade PATTERN |
|
| 8. |
Which of the below is not a valid classification of design pattern?(a) Creational patterns(b) Structural patterns(c) Behavioural patterns(d) Java patternsI have been asked this question in an interview.This question is from Design Patterns topic in division Java Beans & JDBC of Java |
|
Answer» The CORRECT OPTION is (d) JAVA patterns |
|
| 9. |
Which of the below author is not a part of GOF (Gang of Four)?(a) Erich Gamma(b) Gang Pattern(c) Richard Helm(d) Ralph JohnsonThis question was posed to me in a job interview.My query is from Design Patterns in section Java Beans & JDBC of Java |
|
Answer» CORRECT OPTION is (b) Gang Pattern The explanation: Four authors named Richard Helm, Erich Gamma, Ralph Johnson and John Vlissides published a book on design patterns. This book initiated the concept of Design Pattern in SOFTWARE development. They are KNOWN as Gang of Four (GOF). |
|
| 10. |
Which of the following is method of JDBC batch process?(a) setBatch()(b) deleteBatch()(c) removeBatch()(d) addBatch()I got this question in quiz.Enquiry is from JDBC topic in division Java Beans & JDBC of Java |
|
Answer» The correct answer is (d) addBatch() |
|
| 11. |
Which of the following is used to rollback a JDBC transaction?(a) rollback()(b) rollforward()(c) deleteTransaction()(d) RemoveTransaction()The question was posed to me in an internship interview.This intriguing question originated from JDBC in section Java Beans & JDBC of Java |
|
Answer» CORRECT answer is (a) rollback() To EXPLAIN: rollback() method is USED to rollback the transaction. It will rollback all the changes MADE by the transaction. |
|
| 12. |
What does setAutoCommit(false) do?(a) commits transaction after each query(b) explicitly commits transaction(c) does not commit transaction automatically after each query(d) never commits transactionThe question was posed to me in an online quiz.The query is from JDBC topic in portion Java Beans & JDBC of Java |
|
Answer» Correct choice is (c) does not commit TRANSACTION automatically after each query |
|
| 13. |
Which of the following is used to call stored procedure?(a) Statement(b) PreparedStatement(c) CallableStatment(d) CalledStatementI have been asked this question in an online quiz.My question is taken from JDBC in section Java Beans & JDBC of Java |
|
Answer» The CORRECT option is (c) CallableStatment |
|
| 14. |
Which of the following is used to limit the number of rows returned?(a) setMaxRows(int i)(b) setMinRows(int i)(c) getMaxrows(int i)(d) getMinRows(int i)I have been asked this question during an interview.My question is based upon JDBC topic in chapter Java Beans & JDBC of Java |
|
Answer» Correct ANSWER is (a) setMaxRows(INT i) |
|
| 15. |
Which one of the following contains date information?(a) java.sql.TimeStamp(b) java.sql.Time(c) java.io.Time(d) java.io.TimeStampThis question was posed to me in an interview for internship.My doubt is from JDBC in portion Java Beans & JDBC of Java |
|
Answer» Right answer is (a) java.sql.TimeStamp |
|
| 16. |
Which of the following is advantage of using PreparedStatement in Java?(a) Slow performance(b) Encourages SQL injection(c) Prevents SQL injection(d) More memory usageI got this question by my school principal while I was bunking the class.My question is taken from JDBC in division Java Beans & JDBC of Java |
|
Answer» Correct CHOICE is (C) Prevents SQL injection |
|
| 17. |
Which of the following is advantage of using JDBC connection pool?(a) Slow performance(b) Using more memory(c) Using less memory(d) Better performanceI had been asked this question in semester exam.Query is from JDBC topic in section Java Beans & JDBC of Java |
|
Answer» The correct choice is (d) BETTER performance |
|
| 18. |
Which of the following contains both date and time?(a) java.io.date(b) java.sql.date(c) java.util.date(d) java.util.dateTimeI had been asked this question in final exam.This question is from JDBC topic in portion Java Beans & JDBC of Java |
|
Answer» Correct answer is (d) java.util.dateTime |
|
| 19. |
Which attribute is used to specify destroy method?(a) destroy(b) destroy-method(c) destruction(d) destruction-methodI had been asked this question in final exam.This intriguing question comes from Java Beans in chapter Java Beans & JDBC of Java |
|
Answer» RIGHT OPTION is (b) destroy-method Easy EXPLANATION: destroy-method is used to specify the DESTRUCTION method. |
|
| 20. |
Which attribute is used to specify initialization method?(a) init(b) init-method(c) initialization(d) initialization-methodThe question was asked in semester exam.The above asked question is from Java Beans topic in section Java Beans & JDBC of Java |
|
Answer» The correct CHOICE is (b) init-method |
|
| 21. |
What is the attribute of java bean to specify scope of bean to have single instance per Spring IOC?(a) prototype(b) singleton(c) request(d) sessionI had been asked this question at a job interview.The question is from Java Beans in division Java Beans & JDBC of Java |
|
Answer» CORRECT OPTION is (B) singleton Explanation: Singleton scope of BEAN specifies only one instance per SPRING IOC container. This is the default scope. |
|
| 22. |
Java Beans are extremely secured?(a) True(b) FalseI got this question in unit test.Question is taken from Java Beans topic in portion Java Beans & JDBC of Java |
|
Answer» CORRECT choice is (b) False For explanation: JAVABEANS do not add any security features to the JAVA platform. |
|
| 23. |
Which of the following is not a feature of Beans?(a) Introspection(b) Events(c) Persistence(d) SerializationThe question was posed to me in unit test.The question is from Java Beans topic in section Java Beans & JDBC of Java |
|
Answer» Correct CHOICE is (d) Serialization |
|
| 24. |
Which of the following is correct error when loading JAR file with duplicate name?(a) java.io.NullPointerException(b) java.lang.ClassNotFound(c) java.lang.ClassFormatError(d) java.lang.DuplicateClassErrorThe question was posed to me in an international level competition.I'm obligated to ask this question of Java Beans topic in chapter Java Beans & JDBC of Java |
|
Answer» Correct option is (c) java.lang.ClassFormatError |
|
| 25. |
Which file separator should be used by MANIFEST file?(a) /(b) \(c) –(d) //The question was asked during an online interview.This key question is from Java Beans in chapter Java Beans & JDBC of Java |
|
Answer» Correct option is (a) / |
|
| 26. |
Which of the following is not true about Java beans?(a) Implements java.io.Serializable interface(b) Extends java.io.Serializable class(c) Provides no argument constructor(d) Provides setter and getter methods for its propertiesI got this question by my college director while I was bunking the class.Origin of the question is Java Beans in section Java Beans & JDBC of Java |
|
Answer» Right choice is (B) EXTENDS java.io.Serializable CLASS |
|
| 27. |
Which of the following is not an Enterprise Beans type?(a) Doubleton(b) Singleton(c) Stateful(d) StatelessI have been asked this question in an online quiz.This is a very interesting question from Java Beans topic in chapter Java Beans & JDBC of Java |
|
Answer» RIGHT OPTION is (a) Doubleton Explanation: STATEFUL, Stateless and SINGLETON are session beans. |
|