This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 1390
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Evaluating a Value
 
Similar Threads
Bean Autowiring, PropertyPlaceholderConfigurer
regex help
Are the rules regarding timing of initialization of final and non-final fields different?
concat 2 strings using constructor
Accessing an object within a Set in a bean