Raw use of parameterized class 'ResponseDTO'
时间: 2023-09-28 14:08:20 浏览: 49
The "Raw use of parameterized class 'ResponseDTO'" error typically occurs when a generic class or interface is being used without specifying the type argument. In Java, parameterized classes allow you to define classes that can work with different data types.
To resolve this error, you need to specify the type argument when using the generic class or interface. For example, if you have a class called `ResponseDTO` that takes a type parameter, you need to provide the actual type when creating an instance of that class.
Here's an example of how you can fix the error by specifying the type argument for the `ResponseDTO` class:
```java
ResponseDTO<String> response = new ResponseDTO<>();
```
In this example, the type argument `<String>` specifies that the `ResponseDTO` class will work with `String` objects.
By providing the type argument, you ensure that the generic class is used correctly and avoid the "Raw use of parameterized class" error.