JDBC/JDBC Mcq Set 2 Sample Test,Sample questions

Question:
 How can we take input text from user in HTML page?

1. input tag

2.inoutBufferedReader tag

3. meta tag

4.scanner tag


Question:
 How to specify autowiring by name?

1.@Qualifier

2.@Type

3.@Constructor

4.@Name


Question:
 Java Beans are extremely secured?

1.True

2.False

3.all of the above

4.none of the above


Question:
 Java code is embedded under which tag in JSP?

1.Declaration

2.Scriptlet

3.Expression

4. Comment


Question:
 What does MIME stand for?

1.Multipurpose Internet Messaging Extension

2.Multipurpose Internet Mail Extension

3.Multipurpose Internet Media Extension

4.Multipurpose Internet Mass Extension


Question:
 Which attribute is used to specify destroy method?

1.destroy

2.destroy-method

3. destruction

4. destruction-method


Question:
 Which is mandatory in <jsp:useBean /> tag?

1. id, class

2.id, type

3. type, property

4. type,id


Question:
 Which of the following is correct error when loading JAR file with duplicate name?

1. java.io.NullPointerException

2.java.lang.ClassNotFound

3. java.lang.ClassFormatError

4. java.lang.DuplicateClassError


Question:
 Which of the following is not true about Java beans?

1.Implements java.io.Serializable interface

2.Extends java.io.Serializable class

3. Provides no argument constructor

4.Provides setter and getter methods for its properties


Question:
 Which of the following is not true for Ant?

1. It is a tool box

2. It provides lifecycle management

3.It is procedural

4.It doesn’t have formal conventions


Question:
 Which one is the correct order of phases in JSP life cycle?

1.Initialization, Cleanup, Compilation, Execution

2.Initialization, Compilation, Cleanup, Execution

3. Compilation, Initialization, Execution, Cleanup

4.Cleanup, Compilation, Initialization, Execution


Question:
 Which one of the following is correct for directive in JSP?

1.<%@directive%>

2. <%!directive%>

3. <%directive%>

4. <%=directive%>


Question:
Application is instance of which class?

1.javax.servlet.Application

2. javax.servlet.HttpContext

3. javax.servlet.Context

4. javax.servlet.ServletContext


Question:
“out” is implicit object of which class?

1.javax.servlet.jsp.PrintWriter

2. javax.servlet.jsp.SessionWriter

3.javax.servlet.jsp.SessionPrinter

4. javax.servlet.jsp.JspWriter


Question:
“request” is instance of which one of the following classes?

1.Request

2.HttpRequest

3.HttpServletRequest

4. ServletRequest


Question:
Can <!–comment–> and <%–comment–%> be used alternatively in JSP?

1.True

2.False

3.all of the above

4.none of the above


Question:
Can we run Junits as a part of Jenkins job?

1. True

2.False

3.all of the above

4.none of the above


Question:
Default value of autoFlush attribute is?

1. true

2. False

3.all of the above

4.none of the above


Question:
How are java web applications packaged?

1.jar

2. war

3. zip

4.both jar and war


Question:
How can we connect to database in a web application?

1.oracle sql developer

2.toad

3.JDBC template

4.mysql


Question:
How is the dynamic interception of requests and responses to transform the information done?

1.servlet container

2. servlet config

3.servlet context

4.servlet filter


Question:
Servlet are used to program which component in a web application?

1.client

2. server

3. tomcat

4.applet


Question:
What is the attribute of java bean to specify scope of bean to have single instance per Spring IOC?

1.prototype

2.singleton

3.request

4. sessionAttribute


Question:
What is the storage capacity of single cookie?

1.2048 MB

2.2048 bytes

3. 4095 bytes

4.4095 MB


Question:
What temporarily redirects response to the browser?

1. <jsp:forward>

2.<%@directive%>

3. response.sendRedirect(URL)

4. response.setRedirect(URL)


Question:
What type of protocol is HTTP?

1.stateless

2.stateful

3.transfer protocol

4.information protocol


Question:
When destroy() method of a filter is called?

1.The destroy() method is called only once at the end of the life cycle of a filter

2.The destroy() method is called after the filter has executed doFilter method

3.The destroy() method is called only once at the begining of the life cycle of a filter

4.The destroyer() method is called after the filter has executed


Question:
Which are the session tracking techniques?
i. URL rewriting
ii. Using session object
iii.Using response object
iv. Using hidden fields
v. Using cookies
vi. Using servlet object

1. i, ii, iii, vi

2.i, ii, iv, v

3.i, vi, iii, v

4.i, ii, iii, v


Question:
Which attribute is used to specify initialization method?

1.init

2.init-method

3.initialization

4.initialization-method


Question:
Which attribute uniquely identification element?

1.ID

2.Class

3.Name

4. Scope


Question:
Which command can be used to check maven version?

1.mvn -ver

2.maven -ver

3.maven -version

4.mvn -version


Question:
Which component can be used for sending messages from one application to another?

1. server

2.client

3.mq

4. webapp


Question:
Which environment variable is used to specify the path to maven?

1.JAVA_HOME

2.PATH

3.MAVEN_HOME

4.CLASSPATH


Question:
Which file is used to define dependency in maven?

1.build.xml

2.pom.xml

3.dependency.xml

4.version.xml


Question:
Which file is used to specify the packaging cycle?

1.build.xml

2.pom.xml

3.dependency.xml

4.version.xml


Question:
Which object stores references to the request and response objects?

1.sessionContext

2.pageContext

3. HttpSession

4. sessionAttribute


Question:
Which of below is not a dependency management tool?

1.Ant

2.Maven

3.Gradle

4. Jenkins


Question:
Which of the below can be used to debug front end of a web application?

1.Junit

2. Fitnesse

3.Firebug

4. Mockito


Question:
Which of the below is a source code management tool?

1.Jenkins

2.Maven

3.Git

4. Hudson


Question:
Which of the below is not a javascript framework for UI?

1.Vaadin

2. AngularJS

3.KendoUI

4. Springcore


Question:
Which of the following action variable is used to include a file in JSP?

1. jsp:setProperty

2. jsp:getProperty

3. jsp:include

4. jsp:plugin


Question:
Which of the following is not a directive in JSP?

1.page directive

2. include directive

3.taglib directive

4.command directive


Question:
Which of the following is not a feature of Beans?

1.Introspection

2.Events

3.Persistence

4.Serialization


Question:
Which of the following is not a maven goal?

1. clean

2.package

3.install

4. debug


Question:
Which of the following is not an Enterprise Beans type?

1. Doubleton

2.Singleton

3.Stateful

4. Stateless


Question:
Which of the following is true about servlets?

1.Servlets execute within the address space of web server

2.Servlets are platform-independent because they are written in java

3.Servlets can use the full functionality of the Java class libraries

4.Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries


Question:
Which page directive should be used in JSP to generate a PDF page?

1.contentType

2.generatePdf

3. typePDF

4.contentPDF


Question:
Which tag is used to set a value of a JavaBean?

1.<c:set>

2.<c:param>

3. <c:choose>

4.<c:forward>


Question:
Which tag should be used to pass information from JSP to included JSP?

1.Using <%jsp:page> tag

2.Using <%jsp:param> tag

3.Using <%jsp:import> tag

4.Using <%jsp:useBean> tag


Question:
_jspService() method of HttpJspPage class should not be overridden.

1. True

2.False

3.all of the above

4.none of the above


More MCQS

  1. JDBC Mcq Set 1
  2. JDBC Mcq Set 2
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!