New answers tagged

1 vote

When teaching Java, should I teach try-catch from the outset?

Create a type value or error (but nothing else: so not object) e.g. ...
ctrl-alt-delor's user avatar
1 vote

When teaching Java, should I teach try-catch from the outset?

In Java and many other languages that followed it, Exceptions are un-exceptional: e.g. it is not exceptional to get to the end of a file. Your example of removing an item from an empty list, is a ...
ctrl-alt-delor's user avatar
2 votes
Accepted

When teaching Java, should I teach try-catch from the outset?

I'm not sure what the progression is in your education system, but the one I went through to learn programming as a complete novice in Java (~2015, in the USA, at a community college) went roughly ...
ggorlen's user avatar
  • 630
2 votes

When teaching Java, should I teach try-catch from the outset?

This answer is based on a software engineering point of view, in not teaching things that contradict best practices. (And there are lots of misconceptions and bad practices around exception handling, ...
Ralf Kleberhoff's user avatar
2 votes

When teaching Java, should I teach try-catch from the outset?

You may need to teach this concept, but I'd do it at the point it becomes be best option. If things can fail, some sort of test or similar action is needed. For a list of objects, one can return null ...
Buffy's user avatar
  • 36k

Top 50 recent answers are included