Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is the primary purpose of the Reflection API in Java?
Think about what 'reflection' allows you to do in programming.
Name one key class used in Java Reflection.
What class represents a class or interface?
What does the Reflection API allow you to do?
Think about the flexibility that runtime gives compared to compile time.
Can reflection access private fields of classes?
Remember, accessing private members is a feature of the Reflection API.
Write a Java program that uses reflection to list all methods in a class and execute one of them.
Remember to handle exceptions for invocations.
Design an annotation and use reflection to process classes with that annotation, printing relevant data.
Make sure you think about how to define and apply your annotation.
7 more questions in this section. Enroll free to practise them all.
Enroll free