Reputation: 149
Using raw type warning occured, how to use parameterized type for
List apa=(List)class1.method1(xx);
All the values present in the list are of String
type.
Upvotes: 0
Views: 66
Reputation: 14453
If all present values are String
means use like this,
List<String> apa = (List<String>)class1.method1(xx);
Upvotes: 0
Reputation: 120198
List<String> apa = class1.method1(xx);
and specify return type of List<String>
for method1
in the class definition.
Upvotes: 2