Learn Java Programming - Object .getClass() and Class Common Methods Tutorial

Published: 15 January 2016
on channel: Daniel Ross
7,679
64

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.


On this page of the site you can watch the video online Learn Java Programming - Object .getClass() and Class Common Methods Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 15 January 2016, share the link with friends and acquaintances, this video has already been watched 7,679 times on youtube and it was liked by 64 viewers. Enjoy your viewing!