Imprimer le type d'une variable Java

En Java, est-il possible d'imprimer le type d'une variable?

public static void printVariableType(Object theVariable){
    //print the type of the variable that is passed as a parameter
    //for example, if the variable is a string, print "String" to the console.
}

Une solution à ce problème serait d'utiliser un if pour chaque type de variable, mais qui semble redondant, alors je me demandais si il y a une meilleure manière de faire ceci:

if(theVariable instanceof String){
    System.out.println("String");
}
if(theVariable instanceof Integer){
    System.out.println("Integer");
}
//this seems redundant and verbose. Is there a more efficient solution (e. g., using reflection?).