This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes java in General with exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "java in General with exceptions" Watch "java in General with exceptions" New topic
Author

java in General with exceptions

Gangireddy Danam
Ranch Hand

Joined: Aug 08, 2012
Posts: 32

in real time environment is there any relationship between validations and exception handling..?
i mean validations prevents without entering invalid data.But exceptions are caused due to entered invalid data into program..?
Tell me the answer how real time people utilize exception handling ?
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Gangireddy Danam wrote:in real time environment is there any relationship between validations and exception handling..?


If we are given invalid data, we will often throw an exception. For instance, if "123.456" is passed to Integer.parseInt(), it will throw NumberFormatException.

Also, note that you probably mean "real-world", not "real-time."
 
GeeCON Prague 2014
 
subject: java in General with exceptions