Explore topic-wise MCQs in Advanced Java.

This section includes 11 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 object is used by spring for authentication?

A. ContextHolder
B. SecurityHolder
C. AnonymousHolder
D. SecurityContextHolder
Answer» E.
2.

How can we invalidate a session?

A. session.discontinue()
B. session.invalidate()
C. session.disconnect()
D. session.falsify()
Answer» C. session.disconnect()
3.

SessionIDs are stored in cookies.

A. True
B. False
Answer» B. False
4.

Which of the following is not true about session?

A. All users connect to the same session
B. All users have same session variable
C. Default timeout value for session variable is 20 minutes
D. New session cannot be created for a new user
Answer» D. New session cannot be created for a new user
5.

Which of the following leads to high network traffic?

A. URL rewriting
B. Hidden form fields
C. SSL sessions
D. Cookies
Answer» B. Hidden form fields
6.

Which of the following is stored at client side?

A. URL rewriting
B. Hidden form fields
C. SSL sessions
D. Cookies
Answer» E.
7.

Which of the below is not a session tracking method?

A. URL rewriting
B. History
C. Cookies
D. SSL sessions
Answer» C. Cookies
8.

Which of the following is used for session migration?

A. Persisting the session in database
B. URL rewriting
C. Create new database connection
D. Kill session from multiple sessions
Answer» B. URL rewriting
9.

WHICH_OBJECT_IS_USED_BY_SPRING_FOR_AUTHENTICATION??$

A. ContextHolder
B. SecurityHolder
C. AnonymousHolder
D. SecurityContextHolder
Answer» E.
10.

Which method creates unique fields in the HTML which are not shown to the user?

A. User authentication
B. URL writing
C. HTML Hidden field
D. HTML invisible field
Answer» D. HTML invisible field
11.

What is the maximum size of cookie?

A. 4 KB
B. 4 MB
C. 4 bytes
D. 40 KB
Answer» B. 4 MB