Java Class getSimpleName() MethodThe getSimpleName() method of java Class class returns the simple name of the underlying class as given in the source code. In the case of an anonymous class, it returns an empty string. SyntaxParameterNA ReturnsThe simple name of the underlying class. ThrowsNA Example 1Test it NowOutput: Class Name = ClassgetSimpleNameExample1 Class SimpleName = ClassgetSimpleNameExample1 Example 2Test it NowOutput: ClassgetSimpleNameExample2 Next TopicJava Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India