Advance Java MCQ Questions & Answers
- Annotation added as an input parameter to the handler method.
Ans : @pathvariable - _____ Drivers are used to manipulate data from database with the help of java platform.
Ans : JDBC - POJO in Java stands for ___
Ans : Plain Old Java Object - 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
- Which advice is executed once a joint point finishes?
Ans : @after - The __ object is an instance of a javax.servlet.http.HttpServletRequest object.
Ans : Request - ______ 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 - _____is one of the major components of the Spring Framework.
Ans : Aspect-oriented programming (AOP)
- REST stands for ________.
Ans : Representational State Transfer - <%– A JSP –%> is the Syntax of JSP ______.
Ans : comment - Spring Boot does not generate code and there is absolutely no requirement for .
Ans : XML configuration. - ____ 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
- Spring is the most popular application development framework for…
Ans : Enterprise Java. - JDBC stands for ____
Ans : Java Database Connectivity - The _____ is known as the wildcard in generic programming .
Ans : ? - The Collection Interface also contains methods that performs operations on entire collections which are also called as ____operations.
Ans : Bulk
- Spring JDBC provides a simple API on
Ans : Top of JDBC - Spring MVC is a specific Spring-based web framework in a .
Ans : Traditional Sense - 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
- The Java______ specification defines an application programming interface for communication between the Web server and the application program.
Answer : Servlet - _______method used to append all of the elements from the mentioned collection to the existing set.
Answer : addAll() - Which tag is used to set a value of a JavaBean?
Answer : <c:set>* - Which of the following could be written with little knowledge of java?
Answer : Java Server Pages - ………………… is the first phase of the servlet life cycle.
Answer : Initialization
- What is the return type of lambda expression?
Answer : Function - Which one of the following is correct for directive in JSP?
Answer : <%@directive%> - Which of the following is a business component in J2EE?
Answer : Enterprise Java Beans (EJB) - Which of these data type cannot be type parameterized?
Answer – Array - How constructor can be used for a servlet?
Answer – Initialization and a Constructor function.
- Java + ___ = JSP.
Answer : HTML - Which of the following is not a kind of exception that is thrown by JDBC method?
Answer : DataRounding - What is built on top of socket programming?
Answer : RMI
- Which attribute uniquely identification element?
Answer : ID - Which of the following is the main drawback of CGI?
Answer : Scalability
- Among the following options choose the one which shows the advantage of using the JDBC connection pool.
Answer : Better Performance - Which of the following modifiers can be applied to a constructor?
Answer : Private - __ tag is used to define or you can say declare methods and variables in JSP.
Answer : Declaration Tag - Each type parameter section contains one or more type parameters separated by ___.
Answer : commas - Why should we use Generic?
Answer : All of these - Syntax of LAMBDA Expression is (Parameters-list)(Expression body)
Answer : ->
For More Updates Join Our Channels :