Explore topic-wise MCQs in Advanced Java.

This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Advanced Java knowledge and support exam preparation. Choose a topic below to get started.

1.

Which is mandatory in tag?

A. id, class
B. id, type
C. type, property
D. type,id
Answer» B. id, type
2.

Which is not a directive?

A. include
B. page
C. export
D. useBean
Answer» D. useBean
3.

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

A. Request
B. HttpRequest
C. HttpServletRequest
D. ServletRequest
Answer» D. ServletRequest
4.

Which option is true about session scope?

A. Objects are accessible only from the page in which they are created
B. Objects are accessible only from the pages which are in same session
C. Objects are accessible only from the pages which are processing the same request
D. Objects are accessible only from the pages which reside in same application
Answer» C. Objects are accessible only from the pages which are processing the same request
5.

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

A. True
B. False
Answer» B. False
6.

Application is instance of which class?

A. javax.servlet.Application
B. javax.servlet.HttpContext
C. javax.servlet.Context
D. javax.servlet.ServletContext
Answer» E.
7.

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

A. Using <%jsp:page> tag
B. Using <%jsp:param> tag
C. Using <%jsp:import> tag
D. Using <%jsp:useBean> tag
Answer» B. Using <%jsp:param> tag
8.

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

A. contentType
B. generatePdf
C. typePDF
D. contentPDF
Answer» B. generatePdf
9.

WHICH_IS_MANDATORY_IN__TAG??$

A. id, class
B. id, type
C. type, property
D. type,id
Answer» B. id, type
10.

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

A. Request
B. HttpRequest
C. HttpServletRequest
D. ServletRequest
Answer» D. ServletRequest
11.

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

A. Initialization, Cleanup, Compilation, Execution
B. Initialization, Compilation, Cleanup, Execution
C. Compilation, Initialization, Execution, Cleanup
D. Cleanup, Compilation, Initialization, Execution
Answer» D. Cleanup, Compilation, Initialization, Execution
12.

Default value of autoFlush attribute is?

A. true
B. false
Answer» B. false