InterviewSolution
Saved Bookmarks
| 1. |
What is used to get class name in reflection?(a) getClass().getName()(b) getClass().getFields()(c) getClass().getDeclaredFields()(d) new getClass()I got this question in an online interview.The question is from Reflection API topic in section Session Management, JSP & API of Java |
|
Answer» RIGHT answer is (a) GETCLASS().getName() EXPLANATION: getClass().getName() is USED to get a class name from object in REFLECTION. |
|