Constructor Checker

Report a typo

Implement checkPublicParameterlessConstructor that returns true if the provided class declares public parameterless constructor and false otherwise.

Write a program in Java 17
/**
Check whether the class declares public parameterless constructor
*/
class ConstructorChecker {

public boolean checkPublicParameterlessConstructor(Class<?> clazz) {
// Add implementation here
}

}
___

Create a free account to access the full topic