The Object class contains a method named .getClass() that returns an instance of type Class - that's right, there is a class named Class (sure, why not???). All kidding aside, the class Class contains over 60 methods that you can use to determine various things about an instance of an object. Every class and interface inherits this method either directly or indirectly from the Object class so we can invoke it on just about everything.
The .getClass() method takes no parameters and is super easy to invoke, just tack it on to your reference variable and you are good to go.
In questa pagina del sito puoi guardare il video online Learn Java Programming - Object .getClass() and Class Common Methods Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daniel Ross 15 gennaio 2016, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 7,679 volte e gli è piaciuto 64 spettatori. Buona visione!