It's not a secret anymore!
The moose likes Servlets and the fly likes masking of nulls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "masking of nulls" Watch "masking of nulls" New topic

masking of nulls

Anuj Anand
Ranch Hand

Joined: Nov 18, 2000
Posts: 96
I want to mask nulls and zeroes to spaces in java.Can somebody suggest me how to do that
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Before outputting the String, simply check if it's null. If it is, reassign it to the String " "

The code involves an if statement, but that's the only two clues you'll get from me.
I agree. Here's the link:
subject: masking of nulls
It's not a secret anymore!