1
   

Any Java programmers here-need help

 
 
Wilso
 
Reply Sat 1 Apr, 2006 09:47 pm
For those who've programmed in java, you know that a variable must be initialised in order for it to be used. Sometimes you'll need to initialise a variable to no value.

I can do it for a numerical variable such as an integer.

int x=0;

I can do it for a String variable.

String greeting="";

I need to find out how to set a character variable to a null or space.

Thankyou.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 1,069 • Replies: 3
No top replies

 
JPB
 
  1  
Reply Fri 7 Apr, 2006 01:54 pm
Mr B is a java guru. I'll send him your question in an email.
0 Replies
 
JPB
 
  1  
Reply Fri 7 Apr, 2006 02:41 pm
Here's what he said, sorry I didn't see your question earlier.

char Space = ' '; // initialized to a space
char Null = '\0'; // initialized to the null character
0 Replies
 
Wilso
 
  1  
Reply Fri 7 Apr, 2006 03:08 pm
Thankyou
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Any Java programmers here-need help
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/26/2024 at 02:45:06