Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Java
/
Reflection
A class declares `void setLimit(int value)`. What happens when code calls `getMethod("set…
from Reflection
Java 25 LTS
beginner
1 min
A class declares `void setLimit(int value)`. What happens when code calls `getMethod("setLimit", Integer.class)`?
It throws NoSuchMethodException.
It finds the method and unboxes during lookup.
It finds the method only if an Integer argument is non-null.
It selects every overload compatible with Integer.
Check
Ask AI about this kata
Report an error
next kata
Where is an exception thrown normally by a method invoked through `Method.invoke()`?
Quiz
A new version is available
Reload