This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Generics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Generics" Watch "Generics" New topic
Author

Generics

Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509
When I try to run generics + legacy code, I get this warning:
Recompile with -Xlint:unchecked for details.

How do i recompile it??
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3606
    
  15
The same way as you compiled it the first time but add -Xlint:unchecked as an extra option.


Joanne
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

The warning doesn't mean you need to recompile it. It's just a hint that if you recompile with these options, you see why this warning is being shown. Since you're using legacy code it's probably something with raw types.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
GeeCON Prague 2014
 
subject: Generics