The method is defined as below:
public static void checkNotNull<T extends Throwable>(Object value, String name, Class<T> exceptionClass)
{
}
then the compiler throws some error:
**Multiple markers at this line
- void is an invalid type for the variable checkNotNull
- Duplicate field ValidationUtility.value
- Syntax error on token ">", Identifier expected after this token
- The type Class is not generic; it cannot be parameterized with
arguments <T>
- The type Class is not visible
- Duplicate field ValidationUtility.exceptionClass
- T cannot be resolved to a type
- Syntax error, insert ";" to complete FieldDeclaration
- Duplicate field ValidationUtility.String**
Is anything wrong? Please help me, thank you.
void checkNotNull<T extends Throwable>(...,Class<T> exceptionClass)is a wrong syntax. It Should be<T extends Throwable>void checkNotNull(...,Class<T> exceptionClass)