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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java 7: A Beginner Watch "Java 7: A Beginner New topic
Author

Java 7: A Beginner's Tutorial

Alan McIvor
Greenhorn

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?

Thanks.

Alan


Alan
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43377
    
  32
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
Author
Ranch Hand

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


[Java-Success.com] | [Java job hunting know how] | [Java resumes]
lakshman kumaran
Greenhorn

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???
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java 7: A Beginner's Tutorial
 
It's not a secret anymore!