• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.text.ParseException Example  RSS feed

 
Ranch Hand
Posts: 151
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I was reading in SYBEX OCP bok page 287 about exceptions. I mentioned java.text.ParseException that is a checked exception and it much be handled.
The book also mentions that this exception is used when Converting a String to a number.

Could someone maybe has a simple example to see this exception in action?

Thank you,
Ioanna
 
Rancher
Posts: 2943
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find where that class is used by going to the API doc, find and display the ParseException class and then clicking on the "USE" button at the top of the page.
 
Sheriff
Posts: 4822
135
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a little self-contained program that illustrates the use of a ParseException:
 
Ioanna Katsanou
Ranch Hand
Posts: 151
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Knute Snortum  !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!