Java – get the current class name?

Try,

String className = this.getClass().getSimpleName();

This will work as long as you don’t use it in a static method.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)