• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

java.text.ParseException Example  RSS feed

 
Ranch Hand
Posts: 158
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: 3341
33
  • 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: 5458
147
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: 158
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Knute Snortum  !
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!