You are on page 1of 16

1. What is the meaning of the return data type void?

An empty memory space is returned so that the developers can utilize it. void returns no data type. void is not supported in Java None of the above 6. What is an aggregate object? An object with only primitive attributes An instance of a class which has only static methods An instance which has other objects None of the above

9. Which of the following is considered as a blue print that defines the variables and methods common to all of its objects of a specific kind? Object Class Method Real data types 14. Which of the following is not a return type? boolean void public Button 21. The class java.lang.Exception is protected extends Throwable implements Throwable

serializable 23. All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character) in java are private are serializable are immutatable are final 33. Select all the true statements from the following. AbstractSet extends AbstractCollection AbstractList extends AbstractCollection HashSet extends AbstractSet Vector extends AbstractList All of the above 39. DataInputStream is an example of Output stream I/O stream Filtered stream File stream 18. Which of the following below are abilities of Reflection API in Java? Determining state of an object both b and c Determining duplicate classes Determination of the class of an object 21. What is the difference between java beans and EJB? Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and two public constructors.

Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and one public constructor. Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods and many public constructors. Java beans are reusable components that can be used for customized user objects while EJB are reusable components that are developed to comply with enterprise specification adhering to setter and getter methods with no public constructor. 22. Java beans have no types. True False 27. Which of the following is false for vector class? The size of a Vector is static The Vector class implements an incremental array of objects. The vector components can be accessed using an integer index. The size of a Vector increases or decreases as needed to accommodate the items. Question : 1 URLConnection instance represents a link for accessing or communicating with the resource at the location? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 2 The tag %@include file=?.........? % > helps in including ? A. readOnly B. dynamic C. static D. None of the above Correct Answer is : C Question : 3 Which methods can't be overridden in the JSP page ?

A. jspDestroy() B. jspInit() C. _jspService() D. getParameter() Correct Answer is : C Question : 4 When u try to redirect a page after you already have written something in your page, the error encountered is ?Response has already been committed error? or popularly called 402 error.? A. true B. false C. none of the above D. none of the above Correct Answer is : A Question : 5 All the ___________ data is kept at the application server ___________ data is kept at the web server ? A. dynamic, static B. static, dynamic C. HTML, Servlet D. Servlet, HTML Correct Answer is : A Question : 6 Which tag in the jsp is used to define the error page? A. <%@page isErrorPage="yes" %> B. <%@page isErrorPage="true" %> C. <%@page isErrorPage="false" %> D. None of the above Correct Answer is : B Question : 7 Under JSP 1.0 , the implicit object which can be used for reference is ?this?. It is used to refer to the ______________ ?

A. B. C. D.

Servlet generated by the JSP page Calling the previous JSP page Servlet called by the jsp page None of the above

Correct Answer is : A Question : 8 Which of the following correctly defines JSP technology ? A. JSP page is a text-based document that describes how to process a request to create a response. B. JSP page is a text-based document that describes how to process a to response create a request. C. JSP page is a xml-based document that describes how to process a request to create a response. D. JSP page is a xml-based document that describes how to process a to response create a request. Correct Answer is : A Question : 9 All the ___________ data is kept at the application server ___________ data is kept at the web server ? A. dynamic, static B. static, dynamic C. HTML, Servlet D. Servlet, HTML Correct Answer is : A Question : 10 URL instance represents the location of a resource? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 11 URLConnection instance represents a link for accessing or communicating with the resource at the location? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 12 Which of the following statements is true about JSP tag library?

A. It defines the standard tag that works the same everywhere B. It is a single library and we can use it in multiple jsp containers

C. It has support for the common structural tasks like iteration and condition. D. All of the above Correct Answer is : D Question : 13 The jsp:plugin tag is used to insert the browser-specific OBJECTS and EMBED elements? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 14 Under JSP 1.0 , the implicit object which can be used for reference is ?this?. It is used to refer to the ______________ ?

A. Servlet generated by the JSP page B. Calling the previous JSP page C. Servlet called by the jsp page D. None of the above Correct Answer is : A Question : 15 PageContext class gives information about the ______? A. application B. session C. request D. response Correct Answer is : C Question : 16 The error message displayed when the page is not found at the correct location? A. 500 B. 404 C. 505 D. 440 Correct Answer is : B Question : 17 While using request.getRequestDispatcher(path) we need to give the ______ path of the object ? A. absolute

B. relative C. can't say D. none of the above Correct Answer is : B Question : 18 State true or false -- It is possible to call an external application like MSWord by the click on the JSP page or Servlet? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 19 To show money format on the JSP page we use __________ class ?

A. NumberFormat B. StringBuffer C. CurrencyFormat D. AirthmaticFormat Correct Answer is : A Question : 20 Which of the following correctly defines JSP technology ? A. JSP page is a text-based document that describes how to process a request to create a response. B. JSP page is a text-based document that describes how to process a to response create a request. C. JSP page is a xml-based document that describes how to process a request to create a response. D. JSP page is a xml-based document that describes how to process a to response create a request. Correct Answer is : A Question : 21 The response.sendRedirect("??..?); is the response implicit object to redirect the browser to the different resource? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 22 Request.getServerName () is used to get the name of the server on which the Jsp is running? A. true

B. false C. can't say D. none of the above Correct Answer is : A Question : 23 The tag %@include file=?.........? % > helps in including ? A. readOnly B. dynamic C. static D. None of the above Correct Answer is : C Question : 24 Can we make use of a ServletOutputStream object from the JSP page? A. true B. false C. can't say D. None of the above Correct Answer is : A Question : 25 Can we make use of a ServletOutputStream object from the JSP page? A. true B. false C. can't say D. None of the above Correct Answer is : A Question : 26 The wrapper function like <%! String blanknull(String s) { return (s == null) ? "" : s; } %> then use it inside your JSP form, like value="<%=blanknull(size)% >" > prevents the word__________ from apperaring in an HTML page. A. Null B. Not Null C. space D. None of the above Correct Answer is : A

Question : 27 While using context.getRequestDispatcher(path) we need to give the ______ path of the object ? A. absolute B. relative C. can't say D. none of the above Correct Answer is : A Question : 28 Which methods can't be overridden in the JSP page ? A. jspDestroy() B. jspInit() C. _jspService() D. getParameter() Correct Answer is : C Question : 29 Which tag in the jsp is used to define the error page? A. <%@page isErrorPage="yes" %> B. <%@page isErrorPage="true" %> C. <%@page isErrorPage="false" %> D. None of the above Correct Answer is : B Question : 30 While using request.getRequestDispatcher(path) we need to give the ______ path of the object ? A. absolute B. relative C. can't say D. none of the above Correct Answer is : B Question : 31 Which of the following are the implicit objects in JSP 1. Application, out 2. config, exception 3. page, pageContext 4. request, response, session

A. 1, 2 B. 2, 3 C. 2, 3, 4 D. 1, 2, 3, 4 Correct Answer is : D Question : 32 Can we implement an interface in JSP ? A. true B. false C. can't say D. none of the above Correct Answer is : B Question : 33 Can a JSP process HTML form data ? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 34 URL encoding is the method of replacing all the spaces and other extra characters into their corresponding _______ Characters ? A. Hex B. Binary C. Octal D. Decimal Correct Answer is : A Question : 35 The jsp:plugin tag is used to insert the browser-specific OBJECTS and EMBED elements? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 36 PageContext class gives information about the ______? A. application B. session

C. request D. response Correct Answer is : C Question : 37 When u try to redirect a page after you already have written something in your page, the error encountered is ?Response has already been committed error? or popularly called 402 error.? A. true B. false C. none of the above D. none of the above Correct Answer is : A Question : 38 ServletContext class gives information about the ______? A. request B. session C. container D. none of the above Correct Answer is : C Question : 39 Is data in request object avilable after response.sendRedirect(); A. yes avilable B. Not avilable C. Can't say D. None of the above Correct Answer is : B Question : 40 Which of the scripting of JSP not putting content into service method of the converted servlet ? A. Declarations B. Scriptlets C. expressions D. None of the above Correct Answer is : A Question : 41 The wrapper function like <%! String blanknull(String s) { return (s == null) ? "" : s; }

%> then use it inside your JSP form, like value="<%=blanknull(size)% >" > prevents the word__________ from apperaring in an HTML page. A. Null B. Not Null C. space D. None of the above Correct Answer is : A Question : 42 Which of the scripting of JSP not putting content into service method of the converted servlet ? A. Declarations B. Scriptlets C. expressions D. None of the above Correct Answer is : A Question : 43 Request.getServerName () is used to get the name of the server on which the Jsp is running? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 44 To show money format on the JSP page we use __________ class ?

A. NumberFormat B. StringBuffer C. CurrencyFormat D. AirthmaticFormat Correct Answer is : A Question : 45 The error message displayed when the page is not found at the correct location? A. 500 B. 404 C. 505 D. 440

Correct Answer is : B Question : 46 While using context.getRequestDispatcher(path) we need to give the ______ path of the object ? A. absolute B. relative C. can't say D. none of the above Correct Answer is : A Question : 47 Adding a meta, usage like tag to the jsp prevents it from being indexed by the search engines like Yahoo and Google A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 48 Can we implement an interface in JSP ? A. true B. false C. can't say D. none of the above Correct Answer is : B Question : 49 Can a JSP process HTML form data ? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 50 Adding a meta, usage like tag to the jsp prevents it from being indexed by the search engines like Yahoo and Google A. true B. false C. can't say D. none of the above Correct Answer is : A

Question : 51 State true or false -- It is possible to call an external application like MSWord by the click on the JSP page or Servlet? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 52 URL instance represents the location of a resource? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 53 Is data in request object avilable after response.sendRedirect(); A. yes avilable B. Not avilable C. Can't say D. None of the above Correct Answer is : B Question : 54 The response.sendRedirect("??..?); is the response implicit object to redirect the browser to the different resource? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 55 The jsp:useBean attribute is used to indicate the Serialized bean? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 56 Which of the following statements is true about JSP tag library?

A. It defines the standard tag that works the same everywhere B. It is a single library and we can use it in multiple jsp containers C. It has support for the common structural tasks like iteration and condition. D. All of the above Correct Answer is : D Question : 57 The jsp:useBean attribute is used to indicate the Serialized bean? A. true B. false C. can't say D. none of the above Correct Answer is : A Question : 58 ServletContext class gives information about the ______? A. request B. session C. container D. none of the above Correct Answer is : C Question : 59 Which of the following are the implicit objects in JSP 1. Application, out 2. config, exception 3. page, pageContext 4. request, response, session

A. 1, 2 B. 2, 3 C. 2, 3, 4 D. 1, 2, 3, 4 Correct Answer is : D Question : 60 URL encoding is the method of replacing all the spaces and other extra characters into their corresponding _______ Characters ?

A. Hex B. Binary C. Octal D. Decimal Correct Answer is : A

You might also like