1 2 3 Previous Next 34 Replies Latest reply on Feb 14, 2010 10:34 PM by EJP

    Recompile with -Xlint:unchecked for details. When compiling

      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.


        1 2 3 Previous Next