Answer the question
In order to leave comments, you need to log in
Is there a function in Java to view the methods of an object?
Python has a wonderful dir() function that allows you to output, for example, to the console all the methods of a particular object.
Is there a similar one in Java?
Answer the question
In order to leave comments, you need to log in
There is reflection, but you should not use it. If in a language with static typing you need to get a list of methods at runtime, then you are doing something wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question