Home » JAVA Programming » Java Basic » Question
  1. What is used to get class name in reflection?
    1. new getClass()
    2. getClass().getDeclaredFields()
    3. getClass().getName()
    4. getClass().getFields()
    5. None of these
Correct Option: C

getClass().getName() is used to get a class name from object in reflection.



Your comments will be displayed only after manual approval.