Justin SmithLevel 41, Greenfield, USA, United States
21 July 2021
One thing I have noticed going through these tasks and lessons is that where it says "this task has been completed by n students"... n gets smaller the farther you get into the course. So remember that as you keep persevering through the lessons, you're putting yourself into a smaller and smaller group of people who are learning more about Java programming than those who quit. Keep it up!
if (Justin Smith.comment != true) {
System.out.println("Actually, this is not always true. Tasks in chapter 9-2 (easy ones) were completed by more people than tasks in chapter 8-11 (hard ones");
System.out.println("Justin, I think your statement needs to throw an exception!");
Justin Smith.comment.rating++; //I still understand the motivation factor in your statement :-)
}
task0907 (Exception when working with numbers) caveat: you will get failed if you catch RuntimeException, even though the requirements prohibit only Exception. Do not let IntelliJ add warning suppression annotations to the arithmetic statement; this will result in failure of requirement #5 "Don't delete the existing code in the main method." (yes, the mind boggles).
One rule of thumb is that you should not catch RuntimeException because it is used for unpredictable exceptions, so if you know how to handle it in your catch block, you should fix the code instead of fixing it in the catch. And if you cant fix it in the catch, you should not catch it, so that it does not accidentally get silenced. So either way, one should likely not catch RuntimeException or any un-recoverable exception, unless you want to do some last minute bailout code, and then re-throw RuntimeException so it does not get silenced.
Russell Level 2, Galmpton, Brixham , United Kingdom
30 April 2021
Ahh back on form after the stack trace debacle. Nice one codegym good lessons to breed familiarity with the types of exceptions
NathanLevel 13, Below the firmament, United Kingdom
GO TO FULL VERSION