Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Recompile with -Xlint:unchecked for details. When compiling

843810Nov 1 2004 — edited Feb 14 2010
symbol : constructor Deck()
location: class test.Deck
Deck x = new Deck();
Note: C:\Documents and Settings\Administrator\test\src\test\Deck.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details..

Making a blackjack program. Created the Deck class that will represent the shoe at a casino containing any number of decks of cards. I used the Stack class to represent the shoe of cards, and created a Card class to represent the cards. I push all the cards into the shoe class, but when i pop them they are returned as Object class, so i typecast them as card:

return (Card)shoe.pop();

For some reason this is considered unchecked or unsafe. Have no idea what -Xlint is, or where to uncheck it. Can anyone help me out? I'm using JDK 1.5 and NetBeards IDE 4.0 Beta 2.

Thanks

Scott
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2010
Added on Nov 1 2004
34 comments
4,713 views