This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java 7: A Beginner's Tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java 7: A Beginner Watch "Java 7: A Beginner New topic

Java 7: A Beginner's Tutorial

Alan McIvor

Joined: Dec 22, 2010
Posts: 2
After a break of many, many years I'm trying to get back into programming with learning Java (the last significant programming I did was with BSD 4.2 using C).

One of the things that I scratch my head over is exception handling. It seems like you could spend a significant amount of time writing Try/Catch code. Do you have any rules of thumb or best practices around exception handling?



Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44068
I personally follow what they say in the Java Tutorials, but exceptions can be complicated, so I have some rules about them,
for example
1: The number of conflicting opinions about Java™ Exceptions is equal to the number of people asked
arulk pillai
Ranch Hand

Joined: May 31, 2007
Posts: 3359
This is one of the benefits of using Spring Templates to minimize try/catch blocks.

[] | [Java job hunting know how] | [Java resumes]
lakshman kumaran

Joined: Aug 16, 2011
Posts: 13
arulk pillai wrote:This is one of the benefits of using Spring Templates to minimize try/catch blocks.

What's a Spring Template???
I agree. Here's the link:
subject: Java 7: A Beginner's Tutorial
It's not a secret anymore!