recompile with -xlint: unchecked/unsafe operations

Questionsrecompile with -xlint: unchecked/unsafe operations
sethbeckerman5 Staff asked 4 years ago

The compiler says I am using something not something. Here's what the compiler says:

C:UsersResulDesktopSkillsFor Java>javac -Xlint:unchecked DisplayingText.jav a
DisplayingText.java:25: warning: [unchecked] unchecked call to add(E) as a membe r of the raw type List
list.add(text);
where E is a type-variable:
E extends Object declared in interface List 1 warning
C:UsersResulDesktopSkills For Java>

Since I don't know English well, I translated everything the compiler said. But still, I didn't understand what exactly the compiler wants. because it's the first time I'm facing this.


View on Stack Overflow