1 / 13

"If I can't picture it, I can't understand it."

"If I can't picture it, I can't understand it.". Source Code Online. Please avail yourselves of the many excellent sources for source code, both full applications and snippets. http://stackoverflow.com/ (best for snippets) http://www.planet-source-code.com/ (best for full apps)

dalilaw
Download Presentation

"If I can't picture it, I can't understand it."

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. "If I can't picture it, I can't understand it."

  2. Source Code Online • Please avail yourselves of the many excellent sources for source code, both full applications and snippets. • http://stackoverflow.com/ (best for snippets) • http://www.planet-source-code.com/ (best for full apps) • http://www.freewarejava.com/ • http://www.javagalaxy.com/ • http://www.java2s.com • http://www.javadb.com/

  3. Guidelines for using found source code • If you know the URL where you got it, cite like so: • //http://stackoverflow.com/questions/26305/how-can-i-play-sound-in-java • At minimum, cite the domain: • //method found on stackoverflow.com • Don't copy an entire application; that is plagiarism. • Use found source code within reason.

  4. Cross-Cutting Concerns • Exceptions • Assertions • Logging BlackJack Shoe Dealer

  5. Checked versus Unchecked Exceptions

  6. Probable Source

  7. Situations which cause Exceptions (or Errors) to be thrown • An internal Error occurs in the VM (OutOfMemoryError) • An unchecked Exception is generated and thrown (ArrayIndexOutOfBounds) • A checked Exception is thrown (EOFException) • You purposefully throw an Exception.

  8. Exception sequence • Once an exception is generated, the execution sequence immediately terminates until the exception is cuaght (or propogates up the the VM). In practice that means that any code following your statement which threatens to throw an excpetion will NOT be executed if an exception occurs. No return value! • An exception is thrown up the call stack

  9. Some Java naming wierdness in the Exception Handling API • Despite having the 'able' suffix, Throwable is a class, not an interface. • Errors are considered part of the "Exception Handling" API • All Exceptions and Errors occur at Runtime, so RuntimeException is a useless name.

  10. Some things to remember about Exceptions • Anything that inherets from RuntimeException is unchecked.

  11. Intro to Data Structures in Java • Single Lined List • Stack • Binary Tree • others...

More Related