class getname java code example Example: how get class name String className = this.getClass().getSimpleName();