Java Class desiredAssertionStatus() MethodThe desiredAssertionStatus() method of java Class class returns the assertion status that would be assigned to this (current class object) class, if it is to be initialized at the time desiredAssertionStatus() method is invoked. If the assertion status is already set, the most recent setting will be returned. SyntaxParameterNo parameter is passed. Returnsdesired assertion status of the specified class. ThrowsDoes not throw any Exception. Example 1Test it NowOutput: Class Name = ClassasdesiredAssertionStatusExample1 status = false Example 2Test it NowOutput: Base class Costructor Class Name = ClassasdesiredAssertionStatusExample1 status = false 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