in Education by
Can servlet class declare constructor with ServletConfig object as an argument? (a) True (b) False I have been asked this question in examination. Question is from Servlet topic in section Java Server Technologies & Servlet of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct answer is (b) False Explanation: ServletConfig object is created after the constructor is called and before init() is called. So, servlet init parameters cannot be accessed in the constructor.

Related questions

0 votes
    How constructor can be used for a servlet? (a) Initialization (b) Constructor function (c) Initialization ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What happens when a constructor is defined for an interface? (a) Compilation failure (b) Runtime Exception ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Servlet are used to program which component in a web application? (a) client (b) server (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    How does applet and servlet communicate? (a) HTTP (b) HTTPS (c) FTP (d) HTTP Tunneling I have ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What will happen if the first argument of open() is omitted? (a) Error Page (b) Remains in the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    When will the fourth argument to open() useful? (a) When the second argument names a retired window ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of the following is a correct constructor for thread? (a) Thread(Runnable a, String str) (b ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Can servlet class declare constructor with ServletConfig object as an argument? (a) True (b) False I have been ... & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Object of which class is used to compile regular expression? (a) Pattern class (b) Matcher class (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which design pattern ensures that only one object of particular class gets created? (a) Singleton pattern (b ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...