+ 2
how to explore an object methods and its attributes in Java without documentation
In python we can use dir(object) to explore the class methods and its attributes, is there a way to have similar function in Java?
1 ответ
+ 1
You can use the getMethods() function, which operates on a Class object. To get the Class of your object obj you can use obj.getClass ().