Discussion

This example has been compiled with JDK 9

Output

We can see that type (class) of array can be retrived from getClass() and Name of Class with getName().

In next post we will use getClass and getName on all the data types and see what will be the results.

Categories: Java

faltutech

Pursuing MCA from YMCA University, Faridabad

Leave a Reply

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

Read previous post:
Sort an Array in Java (Using java.util)
Sort an Array in Java (Using java.util)

[crayon-5a2bbac5d175d081333016/]

Close