• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java 7: A Beginner's Tutorial

 
Alan McIvor
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the benefits of using Spring Templates to minimize try/catch blocks.
 
lakshman kumaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arulk pillai wrote:This is one of the benefits of using Spring Templates to minimize try/catch blocks.

What's a Spring Template???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic