November 12, 2024

Advance Java MCQ Questions & Answers

Share :

Advance Java MCQ Questions & Answers


  1. Annotation added as an input parameter to the handler method.
    Ans : @pathvariable
  2. _____ Drivers are used to manipulate data from database with the help of java platform.
    Ans : JDBC
  3. POJO in Java stands for ___
    Ans : Plain Old Java Object
  4. Autowiring by property name. Spring container looks at the properties of the beans on which autowire attribute is set to ___in the XML configuration file
    Ans : byName

  5. Which advice is executed once a joint point finishes?
    Ans : @after
  6. The __ object is an instance of a javax.servlet.http.HttpServletRequest object.
    Ans : Request
  7. ______ indicates if any component orservice will or will not participate in a transaction and how will it behave if the calling component/service already has or does not have a transaction created already.
    Ans : Transaction propagation
  8. _____is one of the major components of the Spring Framework.
    Ans : Aspect-oriented programming (AOP)

  9. REST stands for ________.
    Ans : Representational State Transfer
  10. <%– A JSP –%> is the Syntax of JSP ______.
    Ans : comment
  11. Spring Boot does not generate code and there is absolutely no requirement for .
    Ans : XML configuration.
  12. ____ is just extension of the already existing and expansive Spring frameworks, but it has some specific features that make the application easier for working within the developer ecosystem.
    Ans : Spring Boot

  13. Spring is the most popular application development framework for…
    Ans : Enterprise Java.
  14. JDBC stands for ____
    Ans : Java Database Connectivity
  15. The _____ is known as the wildcard in generic programming .
    Ans : ?
  16. The Collection Interface also contains methods that performs operations on entire collections which are also called as ____operations.
    Ans : Bulk
  17. Spring JDBC provides a simple API on
    Ans : Top of JDBC
  18. Spring MVC is a specific Spring-based web framework in a .
    Ans : Traditional Sense
  19. At what line will there be a compilation error?
    public class Generics {
    public static void main(String[] args) {
    B b = new B(); /* LINE A */
    C c = b.process(new C()); /* LINE B */
    B<C> b2 = new B<C>(); /* LINE C */
    C c2 = b2.process(new C()); /* LINE D */
    }
    }
    interface A {
    int count();
    void show();
    }
    class B<T extends A> {
    T process(T t) {
    t.count();
    t.show();
    return t;
    }
    }
    class C implements A {
    public int count() { return 25; }
    public void show() { System.out.print(“Class C”); }
    }
    Ans . Line C

For More Updates Regrading Advance DBMS MCQ Question – Click Here

For More Updates Join Our Channels :


Advance Java MCQ Questions & Answers

  1. The Java______ specification defines an application programming interface for communication between the Web server and the application program.
    Answer : Servlet
  2. _______method used to append all of the elements from the mentioned collection to the existing set.
    Answer : addAll()
  3. Which tag is used to set a value of a JavaBean?
    Answer : <c:set>*
  4. Which of the following could be written with little knowledge of java?
    Answer : Java Server Pages
  5. ………………… is the first phase of the servlet life cycle.
    Answer : Initialization


  6. What is the return type of lambda expression?
    Answer : Function
  7. Which one of the following is correct for directive in JSP?
    Answer : <%@directive%>
  8. Which of the following is a business component in J2EE?
    Answer : Enterprise Java Beans (EJB)
  9. Which of these data type cannot be type parameterized?
    Answer – Array
  10. How constructor can be used for a servlet?
    Answer – Initialization and a Constructor function.


  11. Java + ___ = JSP.
    Answer :  HTML
  12. Which of the following is not a kind of exception that is thrown by JDBC method?
    Answer : DataRounding
  13. What is built on top of socket programming?
    Answer : RMI
  14. Which attribute uniquely identification element?
    Answer : ID
  15. Which of the following is the main drawback of CGI?
    Answer : Scalability


  16. Among the following options choose the one which shows the advantage of using the JDBC connection pool.
    Answer : Better Performance
  17. Which of the following modifiers can be applied to a constructor?
    Answer : Private
  18. __ tag is used to define or you can say declare methods and variables in JSP.
    Answer : Declaration Tag
  19. Each type parameter section contains one or more type parameters separated by ___.
    Answer : commas
  20. Why should we use Generic?
    Answer : All of these
  21. Syntax of LAMBDA Expression is (Parameters-list)(Expression body)
    Answer : ->



For More Updates Join Our Channels :