Java – get the current class name? September 26, 2022 by Tarik Try, String className = this.getClass().getSimpleName(); This will work as long as you don’t use it in a static method.