There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
David Starr wrote:I want to understand this exception, but cannot yet perform a test of it. I would like to run it correctly and then so that it throws an exception.
David Starr wrote:So, when I am learning and being presented with an example, I generally expect the example to focus upon what is being taught, not in addition to side topics/issues. I realize a constructor should be
Tested with 0, 1 (printed Eastern then Western on next line) and then I tested it with 1, 2 . It worked with 0 and 1 and got an error for 1, 2 but that was not an expected error. It is in reverse of what I thought. It gave the exception message then printed Western. I would have thought it would have printed Eastern then the exception message.
The println() calls go to System.out. The error message and stack trace go to System.err.
David Starr wrote:java.util.LinkedList
There are two 'List':
java.awt.List
java.util.List
Interesting on the
The println() calls go to System.out. The error message and stack trace go to System.err.
David Starr wrote:The java.util.list appears to be the correct one since it has the Throws as IndexOutOfBoundsException indicated in the API
Still even with flush it prints Western prior to error:
David Starr wrote:How would a person know to go to ArrayList, does not seem straightforward enough to me?
David Starr wrote:I have heard how important the Javadocs are. I wish there were examples in them, and that they would be more easily searchable.
It is taking me longer than I would like to really learn this material. Just as I think I understand something, there is not only additional material on that topic, but more overall topics to learn at the same time. I am going through the tutorials, just not as quickly as I would like.
He is being very helpfulDavid Starr wrote:Jeff, I appreciate this.
Unfortunately the Javadoc comments are written for experienced programmers, and examples of code are few. You will find more code examples in the Java Language Specification, but that can be even more difficult to understand. That is why they are accompanied on the websites by the Java Tutorials, which Jeff gave you a link to part of yesterday. Read that link and go from there to the whole of the Tutorials. But it is too large to read all at once.I have heard how important the Javadocs are. I wish there were examples in them, . . .
David Starr wrote:Overall, is the topic of Handling Exceptions one of the more difficult ones to grasp?
We can walk to school together. And we can both read this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|