Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java in General with exceptions

 
Gangireddy Danam
Ranch Hand
Posts: 32
Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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."
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic