J2EE/J2EE Mcq Question Set 1 Sample Test,Sample questions

Question:
  Attribute in an applet tag is _________

1. codeclass

2.codename

3. codebase

4. none


Question:
  Classloader is a part of _______

1. JNI

2. JVM

3.JSM

4.None


Question:
  How to give the title to a table?

1. <title>

2. <head>

3. <caption>

4.<body>


Question:
 Attribute in an applet tag is _________

1. length

2. width

3. class

4. breadth


Question:
 How to give the italics style in html

1. <ii>....</ii>

2. <it>...</it>

3. <i>....</i>

4. <italics>....</italics>


Question:
 Implicit cursors will be used in _____

1. select query

2. update query

3.delete query

4.All the above


Question:
 The package of Generic Servlet is ________

1.Java.Servlet

2. Javax.Servlet

3. Javax.Servlet.generic

4. Javax.Servlet.http


Question:
A JMS message producer is created by

1.session

2.connection

3.destination

4.industry


Question:
Abstract class can be ______

1. final

2.subclass

3. instantiated

4. none


Question:
Abstract class can’t be final in java.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Any client request to access resources in the WEB-INF/ directory must be returned with a ________?

1.BAD_REQUEST

2. SC_NOT_FOUND

3. SC_INTERNAL_SERVER_ERROR

4.ESC_BAD_REQUEST


Question:
Array in java is ________

1. string of characters

2. string of numbers

3. reference type

4.primitive datatype


Question:
comparison operator in SQL

1. =

2.*

3. $

4. #


Question:
ER diagram is __________

1. high level model

2. low level model

3.representational model

4.hierarchical model


Question:
How can a servlet call a JSP error page?

1.This feature is not supported

2.When the servlet throws the exception, it will be automatically caught by the calling JSP page

3. The servlet should forward the request to the URL of the specific error page. The exception is thrown as an attribute named “javax.servlet.jsp.jspException”

4. The servlet should redirect the response to the error page


Question:
How many abstract classes can a single program contain?

1.At most 1

2.As many as required

3. At least 1

4.At most 127


Question:
If a table has 2 columns with NOT NULL and UNIQUE constraints on it ..what will be the candidate/ primary key?

1. both are called candidate key

2. one can be a primary key

3.one can be a candidate key

4.none of the above


Question:
In JSP, how can you tell which HTTP method (GET or POST) is being used by the client request?

1. Using request.getMethod()

2.Using request.setMethod()

3.Impossible to know

4.None of the mentioned


Question:
It is ________ to have an abstract method.

1.Not mandatory for an static class

2.Not mandatory for a derived class

3.Not mandatory for an abstract class

4.Not mandatory for parent class


Question:
JSP directive is represented by _____

1.<% @ %>

2.<%0 %>

3.<% ! %>

4.<% = %>


Question:
JSP expression is represented by _____

1.<% %>

2.<%0 %>

3. <% ! %>

4.<% = %>


Question:
log() method is available in which interface?

1. Logger Interface

2.False

3.all of the above

4.None of the mentioned


Question:
Return type of getparameter(string) is _______

1. String

2. object

3.int

4.Character


Question:
Servlet is ______

1. j2ee application

2. CGI

3.Java API

4.Netscape


Question:
Super key can be of ______

1. primary key + a non key

2.unique key + a non key

3. candidate key + a non key

4.none of the above


Question:
The argument for the service method

1. service(HttpRequest,HttpResponse)

2. service(HttpResponse,HttpRequest)

3.service(HttpServletRequest, HttpServletResponse)

4. service(ServletResponse,ServletRequest)


Question:
The classes in the _________ directory must be available for the “Classloader” of the application?

1./root/lib/classes/

2. /root/classes/

3./WEB-INF/lib/classes/

4./WEB-INF/classes/


Question:
The syntax for the frame _______

1. frame is declared within the body

2. frameset is declared within body

3. frame is declared within frameset

4.frameset is declared within frame


Question:
What exception is thrown when Servlet initialization fails?

1.ServletException

2.RemoteException

3.IOException

4. SocketException


Question:
What is correct about JSP Scriptlets ?

1.A loop can start in one Scriptlet and end in another

2. Instructions in a Scriptlet must follow Java syntax

3. Semicolon is required at the end of each statement in a Scriptlet

4.All the answers are true


Question:
What is the difference between using “forward” and “sendRedirect()”?

1.forward runs on the client side while sendRedirect() runs on the server side

2. forward runs on the server side while sendRedirect() runs on the client side.

3.Both methods work in the same way.

4.None of the mentioned


Question:
What is the immediate superclass of  Applet class?

1. window

2. Panel

3. container

4. object


Question:
What is the scope of response object?

1. session

2.page

3.request

4.response


Question:
What will be the column heading for the given query?

SELECT sal*10 supply FROM emp;

1. supply

2.Supply

3.SUPPLY

4. sal*10


Question:
What will specify IS A relationship?

1. IS A

2. Extends

3. Volatile

4. Instance of


Question:
Which is a wrapper class?

1. float

2.char

3. int

4.bool


Question:
Which is the serializable interface

1.object

2. method

3.classes

4.state


Question:
Which method is called first each time a servlet is called?

1. Start()

2.Run()

3.init()

4.Servive()


Question:
Which of the following act as an interface between a component and the low level platform?

1.Session Bean

2.Entity Bean

3.Container

4.Applets


Question:
Which of the following is a challenge in a J2EE?

1. Fault tolerance

2.Durability

3.Scalability

4.reliability


Question:
Which of the following is not a feature of Message Driven Bean?

1.It has no client visibility

2.The container cannot pool instances

3. It does not have a local or remote interface

4.It is invoked asynchronously by the container


Question:
Which of the following is not a J2EE client?

1.Web applications

2.Applets

3. Java Web Start clients

4.JSP


Question:
Which of the following is not a reserved word?

1.while

2.goto

3.if

4.then


Question:
Which of the following is not a web centric component?

1. Applets

2.Web Services

3.Servlets

4.Java Server Pages


Question:
Which of the following is not an implicit object in JSP?

1. system

2. page

3.response

4.request


Question:
Which of the following statements are correct about the status of the Http response?

1.HTTP status codes in the 500 to 599 range indicate that the error is related to the client

2.HTTP status codes in the 400 to 499 range indicate that the error is related to the server

3. HTTP status codes in the 300 to 399 range are informational messages.

4.HTTP status codes in the 200 to 299 range means that the client’s request was successful.


Question:
Which one of the following that controls communication between tiers in J2EE multi tiers architecture?

1. API

2.ACL

3.JDBC

4.RMI


Question:
Which operator is used as a termination operator in SQL?

1. ;

2. @

3. #

4. !


Question:
Which technology provides the flexibility to swap between XML processors with no application code changes?

1.JAAS

2.SAX

3.XSLT

4. JAXP


Question:
Why are beans used in the J2EE architecture instead of writing all the code in the JSPs?

1.Allows the separation of roles between web developers and application developers

2.Allows integration with Content Management tools

3.all of the above

4.None of the mentioned


Question:
______ class is a wrapper class for the character data type.

1. char

2. character

3. CHAR

4.CHARACTER


Question:
_______ is the superclass of all classes that are in input streams.

1. output stream

2. input stream

3.buffered o/p stream

4. object output stream


More MCQS

  1. J2EE Mcq Question Set 1
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite 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!