in Education by
How private method can be called using reflection? (a) getDeclaredFields (b) getDeclaredMethods (c) getMethods (d) getFields The question was posed to me during an interview. This key question is from Reflection API topic in chapter Session Management, JSP & API 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
Correct choice is (b) getDeclaredMethods Easiest explanation: getDeclaredMethods gives instance of java.lang.reflect.Method.

Related questions

0 votes
    How private field can be called using reflection? (a) getDeclaredFields (b) getDeclaredMethods (c) getMethods ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Using which annotation non visible or private method can be tested? (a) @VisibleForTesting (b) @NonVisibleForTesting ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    JavaScript Code can be called by using ____________ (a) RMI (b) Triggering Event (c) Preprocessor (d) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    JavaScript Code can be called by using ___________ (a) RMI (b) Triggering Event (c) Preprocessor (d) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    What is not the advantage of Reflection? (a) Examine a class's field and method at runtime (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What is used to get class name in reflection? (a) getClass().getName() (b) getClass().getFields( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    How method can be invoked on unknown object? (a) obj.getClass().getDeclaredMethod() (b) obj.getClass( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method wakes up the first thread that called wait()? (a) wake() (b) notify() (c ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When destroy() method of a filter is called? (a) The destroy() method is called only once at the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    A function definition expression can be called as __________ (a) Function prototype (b) Function literal (c) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What will happen if you set the private flag as 1? (a) Test will be run only by the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which of this method can be used to make the main thread to be executed last among all the threads ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...