Well written.
One of the things I haven't seen enough in Java demos of this type is the usage of main throws. Instead of writing a try/catch for a simple hello world just write:
public static void main(String[] argv) throws IOException { // ... }
Reduces some of the noise in hello world style code and command line utilities.
Indeed, try-catch just obscure business logic. In real world application also, making the decision where to handle excpeption can be really tricky.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well written.
One of the things I haven't seen enough in Java demos of this type is the usage of main throws. Instead of writing a try/catch for a simple hello world just write:
Reduces some of the noise in hello world style code and command line utilities.
Indeed, try-catch just obscure business logic. In real world application also, making the decision where to handle excpeption can be really tricky.