Java in 21 Days (8th Edition) Day 18: Accessing Databases with JDBC and Derby

The cover of Teach Yourself Java in 21 Days (8th Edition) by Rogers Cadenhead

Home Feedback Other Books Previous Day Next Day

Notes and Corrections

  • View the Certification Practice quiz solution
  • Certification answer: Answer (a) is correct. The compiler fails with the error message "non-static variable count cannot be referenced from a static context."

    Answer (b) is incorrect. You can use the new operator along with the constructor of a class anywhere an object of that class would be expected.

    Answer (c) is incorrect. The [] that is used to declare an array can be placed after the variable name instead of the class or data type.

    Answer (d) is incorrect. Class variables can be declared anywhere outside of the methods of a class, not just at the top of the class definition.

  • The URL used in lines 19-21 of the QuoteData application has changed. In line 19, replace "https://quote.wsj.com/" with "https://www.wsj.com/market-data/quotes/" so that the line becomes the following:

    "https://www.wsj.com/market-data/quotes/" + ticker

    This change is reflected in the QuoteData.java file.

Source Files

Activities