Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6985576

collections - error in code snippet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • docs
    • b01
    • generic
    • generic
    • Verified

      There is a sample program (Deal) underlying a link in the Collections>List Interfaces tutorial found at this link: http://download.oracle.com/javase/tutorial/collections/interfaces/list.html
      that is not the same as the code in the lesson. The link for the sample program on the page is this:
      http://download.oracle.com/javase/tutorial/collections/interfaces/examples/Deal.java
       
      List<Card> deck = Deck.newDeck(); // under the link
       
      instead of
       
      List<String> deck = new ArrayList<String>(); // on the page
       
      The program will of course not compile if the Card object is referenced. However, it works fine with the listing on the page.

            jonathan Jonathan Knudsen (Inactive)
            skannan Sowmya Kannan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: