The Artima Developer Community
Sponsored Link

Java Buzz Forum
Type mismatch: cannot convert from null to double

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ananth Chelladurai

Posts: 46
Nickname: cananth
Registered: May, 2013

Ananth Chelladurai is a java cowboy. My blood is tested positive for java
Type mismatch: cannot convert from null to double Posted: Jun 13, 2013 6:01 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Ananth Chelladurai.
Original Post: Type mismatch: cannot convert from null to double
Feed Title: Ananth Chellathurai's walk on software
Feed URL: http://feeds2.feedburner.com/AnanthChellathuraisWalkOnSoftware
Feed Description: My blood is tested +ve for java
Latest Java Buzz Posts
Latest Java Buzz Posts by Ananth Chelladurai
Latest Posts From Ananth Chellathurai's walk on software

Advertisement
Today while I was doing a code review with my team mates, I noticed some code like this <![CDATA[double actGrossC1Budget = (Double) null;]]> When I asked them why do you type cast "null to double", the answer they gave was I got "Type mismatch: cannot convert from null to double". There are 2 possible solutions for this, Use Double instead of double, then you may use null. Use "not a number

Read: Type mismatch: cannot convert from null to double

Topic: Singleton Design Pattern – A Lion’s Eye View Previous Topic   Next Topic Topic: Spring MVC: Validator and @InitBinder


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us