Professional Documents
Culture Documents
Ques
Ques
Ques
1.UnitTestingistheprocessofcheckingwhethertheapplicationisworkingasper requirements.
2.Unittestingisthetestingofasingleentity(class or method). 3.Alloftheabove 4. Noneoftheabove
Which is the correct Java code snippet to be used to create a Functional Interface?
What annotation wiring element is added to scan packages to find and register beans with in the
Application Context?
1.<context:annotation-config/>
2.<context:annotation-scan/>
3. .<context:component-config/>
4. .<context:component-scan/>
In the following example, what type of autowire will be used?
@Autowired(required=false)
publicEmployeeAutowiredByConstructorService(@Qualifier("employee")Employee emp)
{ this.employee=emp; }
1.When you want to provide a collection of classes, you want to reveal just their contracts and their
relationships, not their implementations.
2.When you want to use an existing class, and its interface doesnot match the one you need.
3.When you need to addres ponsibilities to individual objects dynamically without affecting other
objects
4.When you want to separate abstraction and implementation permanently and need to share an
implementation among multiple objects
To send binary output in a response, which of the following method of HttpServletResponse may
be used to get the appropriate Writer/Stream object.
1.java.util.concurrent.Flow 2.java.util.concurrent.Flow.Publisher
3.java.util.concurrent.Flow.Processor 4.Alloftheabove
In Java, which of the following data structure classes CANNOT be type parameterized?
1. .<context:annotation-config/>
2.@ConfigurationpublicclassHelloWorldConfig{..}
3.@Autowired
4.ApplicationContextcontext=newClassPathXmlApplicationContext("Beans.xml");
1. The method close() does not exist for a ResultSet. Only Connections can be closed.
2. The database and JDBC resources are released.
3. You will get a SQLException , because only Statement objects can close ResultSets
4. The ResultSet , together with the statement which created it and the connection from which
the statement was retrieved Closall(), will be closed and released database and JDBC
resources
A JSP page uses the java.util.ArrayList class many times. Instead of referring the class by its
complete package name each time, we want to just use ArrayList. Which attribute of page
directive must be specified to achieve this? Select the one correct
1. Extends
2. Include
3. Package
4. Import
The task authentication blocking of requests ,data compression, logging and auditing are
performed by _________
1. Servlet filter
2. Servlet Config
3. Servlet Context
4. Servlet Container
In Java, Which of these class types supports sequential and parallel processing of data?
a) Queue
b) Lambda
c) ExecutorService
d) Streams
To execute stored procedure total Stock in a database server, which of the following code
snippet is used?
a) Void
b) Lambda
c) Function
d) Regex
What is the effect of executing the following JSP statement , assuming a class with name
Employee exists in classes package?
1. The code does not compile as there is no property attribute of setProperty tag.
2. The code does not compile as the property attribute cannot take * as a value
3. The code sets value of all properties of employee bean to “*”.
4. The code sets the values of all properties of employee bean matching parameters in
request object