Tell me how you can get the name of the current class and make the lower case (so that was in small letters). Forgotten like getClass (). GetName (), but something is not there.

  • you can getSimpleName - no package will be - Oleksiy Morenets
  • one
    this.getSimpleName (). toLowercase ()? - Sergey
  • @serey yes, thanks - Alexey Zemtsov

1 answer 1

There are several options:

GetClass () function

 Integer a = 5; System.out.println(a.getClass().toString().toLowerCase()); 

The result is:

class java.lang.Integer