How can I check to make sure my variable is an int, array, double, etc...?
Edit: For example, how can I check that a variable is an array? Is there some function to
Just use:
.getClass().getSimpleName();
Example:
StringBuilder randSB = new StringBuilder("just a String"); System.out.println(randSB.getClass().getSimpleName());
Output:
StringBuilder