Java MCQ Number 01093

Java MCQ Set 1

1. The output of the requirement analysis and the requirement specification is used as the input for writing ______
a) User Acceptance Test Cases
b) User Rejection Test Cases
c) Product Rejection Test Cases
d) Product Acceptance Test Cases

Answer

Answer: a [Reason:] During UAT, the software is tested by actual users of the product.

2. Testing the end to end functionality of the system as a whole is defined as ___
a) Unit Testing
b) Functional Testing
c) Stress Testing
d) Load Testing

Answer

Answer: b [Reason:] Functional testing covers all possible scenarios including failure paths and boundary cases.

3. Independent testers are _______ and identify different defects at the same time.
a) Isolated
b) Biased
c) Unbiased
d) Modular

Answer

Answer: c [Reason:] Independent tests are conducted by an independent body, be it a group or a person not associated with the development of the product.

4. In a reactive approach, the bulk of the test design work begins ____
a) Before any software is made
b) After some modules are completed
c) After every module, testing is done
d) After the software has been produced

Answer

Answer: d [Reason:] In the reactive approach, the product or software is first completed and then the test design work begins.

5. DSDM stands for _______
a) Dynamic systems development method
b) Dynamic solutions development method
c) Database systems development method
d) Database solutions development method

Answer

Answer: a [Reason:] DSDM is an Agile methodology that stands for Dynamic systems development method.

6. DSDM fixes cost, quality and time at the outset and uses the _____ prioritisation of scope.
a) KISS
b) MoSCow
c) PRINCE2
d) PSP

Answer

Answer: b [Reason:] DSDM uses MoSCow to divide into musts, shoulds, coulds and won’t haves.

7. DSDM originally sought to provide some discipline to the ________ method.
a) MSF
b) Scrum
c) RAD
d) BDD

Answer

Answer: c [Reason:] DSDM was originally made to provide some structure to Rapid Application Development.

8. DSDM is a/an _______ approach.
a) Waterfall
b) Spiral
c) Incremental
d) Iterative and Incremental

Answer

Answer: d [Reason:] DSDM embraces principles of Agile Development leading to an iterative and incremental approach.

9. The one who is responsible to initialise the project by ensuring that essential requirements are found early on in an DSDM environment is ______
a) Executive Sponsor
b) Visionary
c) Ambassador User
d) Advisor User

Answer

Answer: b [Reason:] The Visionary has the most accurate perception of the business objectives of the project.

10. _____ is responsible for gathering and recording the requirements, agreements, and decisions made in every workshop.
a) Executive Sponsor
b) Visionary
c) Scribe
d) Project Manager

Answer

Answer: c [Reason:] Scribe is a separate person responsible for the logging of the defects found.

Java MCQ Set 2

1. ____ is an error condition hiding another error condition.
a) Fault Masking
b) Error Hiding
c) Redundant Masking
d) Fault Gaping

Answer

Answer: a [Reason:] Fault Masking is a type of redundancy analysis.

2. To get an expected test outcome a standard procedure is followed which is referred as _____
a) Testing Mechanism
b) Testing Type
c) Test Cast
d) Test Scope

Answer

Answer: b [Reason:] Testing types include Unit testing, API testing among others.

3. The test instantiates _____ and calls methods on these ___
a) Objects
b) Classes
c) Services
d) Subsystems

Answer

Answer: a [Reason:] The test class has to be instantiated and objects are created.

4. The test runs while a _____ or EJB container hosts the application.
a) Objects
b) Classes
c) Servlet
d) Subsystems

Answer

Answer: c [Reason:] The servlet attaches to any other external resource or device.

5. A layered application may have a front end to handle the presentation and a ________ to execute the business logic.
a) Objects
b) Classes
c) Servlet
d) Back end

Answer

Answer: d [Reason:] The front end is responsible for the presentation while the back end defines the logic.

6. ________ tests examine the code at the boundary of its public API.
a) Unit
b) Integration
c) Functional
d) Loss

Answer

Answer: c [Reason:] This corresponds to testing application use cases.

7. Developers often combine functional tests with ____ tests.
a) Unit
b) Integration
c) Stress
d) Loss

Answer

Answer: b [Reason:] Functional tests are so designed so as to combine with integration tests easily.

8. Layering provides ____ and the ability to access the back end with several different front ends.
a) Flexibility
b) Redundancy
c) Authorization
d) Simplicity

Answer

Answer: a [Reason:] Layering allows to separate the logic from the presentation.

9. ______ tests examine whether the application can process a large number of requests test types within a given period.
a) Unit
b) Integration
c) Stress
d) Acceptance

Answer

Answer: c [Reason:] Stress tests should automatically sends preprogramed requests and tracks how quickly the application responds.

10. The stress test environment should be as close as possible to the ____ environment.
a) Design
b) Review
c) Test
d) Production

Answer

Answer: d [Reason:] Otherwise, the results will not be accurate or useful.

Java MCQ Set 3

1. _____ defines “a flexible, holistic product development strategy where a development team works as a unit to reach a common goal”.
a) Scrum
b) FDD
c) DevOps
d) MDD

Answer

Answer: a [Reason:] Scrum is an iterative and incremental development framework for managing product development.

2. A key principle of Scrum is ________
a) Strict requirements
b) Requirements volatility
c) Fixed scale development
d) Cross-functional development

Answer

Answer: b [Reason:] The customers can change their minds about what they want and need and Scrum recognizes this.

3. The ___ represents the product’s stakeholders and the voice of the customer
a) Development Team
b) Scrum Master
c) Product Owner
d) Servant-leader

Answer

Answer: c [Reason:] The Product Owner is accountable for ensuring that the team delivers value to the business.

4. A _______ is the basic unit of development in Scrum.
a) Class
b) Manifesto
c) Slice
d) Sprint

Answer

Answer: d [Reason:] In Scrum, each iteration is also known as a Sprint, which is the basic unit of development.

5. The Sprint is a/an _____ effort.
a) Timeboxed
b) Closed
c) Sandboxed
d) Open

Answer

Answer: a [Reason:] The Sprint is restricted to a specific duration.

6. Each day during a Sprint, the team holds a ________ with specific guidelines.
a) Impediment
b) Daily Scrum
c) Backlog refinement
d) Scrum of Scrums

Answer

Answer: b [Reason:] A Daily Scrum, also known as a stand up, is held everyday during a sprint.

7. At the _______ the team reflects on the past Sprint.
a) Sprint Review
b) Daily Scrum
c) Sprint Retrospective
d) Sprint Reflection

Answer

Answer: c [Reason:] At the Sprint Retrospective, the team also Identifies and agrees on continuous process improvement actions.

8. The ________ comprises an ordered list of requirements that a Scrum Team maintains for a product.
a) Sprint Review
b) Sprint Backlog
c) Product Increment
d) Product backlog

Answer

Answer: d [Reason:] The product backlog consists of features, bug fixes, non-functional requirements and whatever else must be done to successfully deliver a viable product.

9. The _______ is the list of work the Development Team must address during the next Sprint.
a) Sprint Review
b) Sprint Backlog
c) Product Increment
d) Product backlog

Answer

Answer: b [Reason:] The list is derived by the Scrum Team progressively selecting Product Backlog Items in priority order.

10. The _______ is the sum of all the Product Backlog Items completed during a Sprint.
a) Sprint burn-down char
b) Release burn-up chart
c) Potentially shippable increment
d) Scrumban

Answer

Answer: c [Reason:] Potentially shippable increment, or PSI is integrated with the work of all previous Sprints as well as the current Sprint.

Java MCQ Set 4

1. A profiler can look for ___ in an application.
a) Bottlenecks
b) Redundancies
c) Nodes
d) States

Answer

Answer: a [Reason:] The developer tries to optimize the bottlenecks.

2. _____ tests are a superset of all other tests.
a) Unit
b) Integration
c) Loss
d) Acceptance

Answer

Answer: d [Reason:] Acceptance tests contains characteristics of other tests.

3. A _____ is a test that exercises code by focusing on a single method.
a) Logic unit test
b) Integration unit test
c) Functional unit test
d) Acceptance unit test

Answer

Answer: a [Reason:] Logic unit tests are a type of unit test that focuses on a single method.

4. In logic unit test, the boundaries of a given test can be controlled by using ____
a) Objects
b) Mock objects
c) Controllers
d) Modules

Answer

Answer: b [Reason:] Mock objects help perform specific tests by narrowing down to a specific task.

5. A ____is a test that focuses on the interaction between components in their real environment.
a) Logic unit test
b) Integration unit test
c) Functional unit test
d) Acceptance unit test

Answer

Answer: b [Reason:] Integration unit testing is a type of unit testing which tests components in their real environment.

6. Code that accesses a database has tests that effectively ___ the database.
a) Ignore
b) Delete
c) Call
d) Define

Answer

Answer: c [Reason:] As a part of integration unit testing, the test has to call the database to test its components.

7. A ___ is a test that extends the boundaries of integration unit testing to confirm a stimulus response.
a) Logic unit test
b) Integration unit test
c) Functional unit test
d) Acceptance unit test

Answer

Answer: c [Reason:] Afunctional unit test is a type of unit test which extends the boundaries of integration tests.

8. _______ more dependent on an external environment than pure unit tests are.
a) Logic unit test
b) Integration unit test
c) Functional unit test
d) Acceptance unit test

Answer

Answer: c [Reason:] Functional Unit tests are not pure unit tests nor pure functional tests.

9. ____ are put in scope because they’re often useful as part of the battery of tests run in development.
a) Logic unit test
b) Integration unit test
c) Functional unit test
d) Acceptance unit test

Answer

Answer: c [Reason:] Functional unit tests are more dependent on an external environment than pure unit tests are.

10. Functional Unit tests don’t test a complete ______ as expected by pure functional tests.
a) Workflow
b) Object
c) Class
d) Functions

Answer

Answer: a [Reason:] Functional Unit tests are not complete functional tests and hence, cannot test the complete workflow of the code.

Java MCQ Set 5

1. Servlet listener which loads application context.
a) Security:intercept-methods
b) global-method-security
c) ContextLoaderListener
d) None of the mentioned

Answer

Answer: c [Reason:] A web application can load Spring’s application context by registering the servlet listener ContextLoaderListener.

2. Method to retrieve Spring’s Application context.
a) WebApplicationContextUtils.getRequiredWebApplicationContext()
b) WebApplicationContextUtils.getRequiredWeb()
c) WebApplicationUtils.getRequiredWebApplicationContext()
d) None of the mentioned

Answer

Answer: a [Reason:] As Spring’s application context is stored in the servlet context, you can retrieve it through the WebApplicationContextUtils.getRequiredWebApplicationContext() method by passing in a servlet context.

3. Class used to have full access to the Spring context’s life cycle machinery and dependency injection.
a) DelegatingFilterProxy
b) WebApplicationContextUtils.getRequiredWeb()
c) WebApplicationUtils.getRequiredWebApplicationContext()
d) None of the mentioned

Answer

Answer: a [Reason:] If you want to implement filter-like functionality but want to have full access to the Spring context’s life cycle machinery and dependency injection, use the DelegatingFilterProxy class.

4. In order to leverage Spring’s application context machinery and configuration.
a) HttpRequestHandlerJNDI
b) HttpRequestHandlerServlet
c) HttpRequestHandler
d) None of the mentioned

Answer

Answer: b [Reason:] Suppose we wanted to rewrite the servlet functionality to leverage Spring’s application context machinery and configuration. The HttpRequestHandlerServlet will handle this for us.

5. Interface implemented by object instantiated by HttpRequestHandlerServlet.
a) HttpRequestHandlerJNDI
b) HttpRequestHandlerServlet
c) HttpRequestHandler
d) None of the mentioned

Answer

Answer: c [Reason:] In the servlet example, the HttpRequestHandlerServlet delegated to another object that implemented an interface—HttpRequestHandler—that was considerably simpler than that of a raw servlet.

6. Attribute used to look up and delegate a particular root bean.
a) filter
b) filter-name
c) filtername
d) none of the mentioned

Answer

Answer: b [Reason:] the filter-name attribute is used to determine which bean in the root Spring application context to look up and delegate to.

7. ActionSupport class provides a method to access spring’s application context.
a) getWebApplicationContext()
b) getWebApplication()
c) getApplicationContext()
d) contextEventListener()

Answer

Answer: a [Reason:] Spring provides the ActionSupport class, a subclass of the Action base class that has a convenient getWebApplicationContext() method for you to access Spring’s application context.

8. Struts servlet used to handle web requests.
a) ActionServlet
b) Action
c) ActionSupport
d) ActionStruts

Answer

Answer: a [Reason:] In the web deployment descriptor (i.e., web.xml) of a Struts application, you have to register the Struts servlet ActionServlet to handle web requests.

9. Struts plugin used to integrate wit spring.
a) ContextLoaderListener
b) ContextLoaderPlugin
c) ContextLoaderListenerPlugin
d) None of the mentioned

Answer

Answer: b [Reason:] Another way is to register the Struts plug-in ContextLoaderPlugin in the Struts configuration file.

10. Integration of JSF with Spring’s Application Context.
a) ContextLoaderListener
b) DelegatingVariableResolver
c) SpringBeanFacesELResolver
d) All of the mentioned

Answer

Answer: d [Reason:] Due to the similarity between Spring’s and JSF’s bean models, it’s very easy to integrate them by registering the Spring-provided JSF variable resolver DelegatingVariableResolver (for JSF 1.1) or the SpringBeanFacesELResolver (for JSF 1.2 and greater).

11. To handle web requests in JSF.
a) FacesServlet
b) JavaFacesServlet
c) Faces-Servlet
d) None of the mentioned

Answer

Answer: a [Reason:] In the web deployment descriptor (i.e., web.xml) of a JSF application, you have to register the JSF servlet FacesServlet to handle web requests.

12. Component of JSF, for user’s input in a form.
a) h:form
b) h:commandButton
c) h:outputText
d) h:inputText

Answer

Answer: a [Reason:] h:form component for users to fill form.

13. Tag used to provide result of web requests and is read only.
a) h:form
b) h:commandButton
c) h:outputText
d) h:inputText

Answer

Answer: c [Reason:] The distance result is defined using an h:outputText component because its value is read-only.

14. Tag which triggers server side requests.
a) h:form
b) h:commandButton
c) h:outputText
d) h:inputText

Answer

Answer: b [Reason:] You define an h:commandButton component whose action will be triggered on the server side when you click it.

15. Tag used to integrate Spring with DWR.
a) dwr:integrate
b) dwr:remote
c) dwr:action
d) none of the mentioned

Answer

Answer: b [Reason:] You can simply configure which beans to expose for remote invocation by embedding the tag without involving the DWR configuration file.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.