Java: nested class function? -


ob instance of object.

if call function getname returns class type

ob.getclass().getname()

my doubt is, how come getclass , getname 2 functions, how nested?

no, aren't. getclass return class object. class object contains method called getname. code posted similar to:

 class cls = ob.getclass();  string name = cls.getname(); 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -