This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Evaluating a Value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Evaluating a Value" Watch "Evaluating a Value" New topic
Author

Evaluating a Value

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
How can I determin what value this.changeaffects1 has so I can give it a value of 0 if it is null?

marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

These appear to reference Strings, so I'm not sure what you mean about giving it a value of 0 if it is null. My guess is that you want to assign an empty String ("") to the variable if it's null. If so, you can use something like...


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
Don't get me started about those stupid light bulbs.
 
subject: Evaluating a Value