• Post Reply Bookmark Topic Watch Topic
  • New Topic

Number Formatting Issue  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1780
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code generates a NullPointerException:

Console Output:

[7/30/09 8:57:58:889 CDT] 00000028 ServletWrappe A SRVE0242I: [ResourceManagementEAR] [/ResourceManagement] [ScheduledMonthDisplayServlet]: Initialization successful.
[7/30/09 8:57:59:498 CDT] 00000028 SystemOut O B: 990.0
[7/30/09 8:57:59:498 CDT] 00000028 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet ScheduledMonthDisplayServlet. Exception thrown : java.lang.NullPointerException




This is also in the class:



Well, one more time I jumped the gun and as sonn as I posted the problem I found my error. All I had to do is remove the second DecimalFormat that was included in the constructor.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!