How do you show type in Java?

We can check the type of a variable in Java by calling getClass(). getSimpleName() method via the variable . The below example illustrates the use of this function on non-primitive data types like String . The below example illustrates the use of this method on an array.

Sizin İçin Seçtik  What are the different ways of object creation?

Leave a Reply

Your email address will not be published. Required fields are marked *