Q:

how to replace the null character

In java ,i have editfield whcih takes its input ,in it we can enter 3 digits
when i enter first and third ,leaving 2 digit empty ,how to remove empty digit
thanks

A:

The null character is a character like all others. Its value as a byte is 0. Use \0 to identify it. (Same in C, Perl, C++, C#, etc).
Java:
String noSpaces = perhapsSpaces.replaceAll("\0", " ");
System.out.print(noSpaces + "\n");

Perl:
$perhapsSpaces =~ s/\0/ /g;
print $perhapsSpaces . "\n";

