| Author |
how to initialize char??
|
yuvraj kotegar
Ranch Hand
Joined: Jul 31, 2008
Posts: 120
|
|
how to initialize it? like string is null int is 0 how about char?
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8290
|
|
|
Have a look at The Java Tutorial: Primitive Data Types.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
yuvraj kotegar
Ranch Hand
Joined: Jul 31, 2008
Posts: 120
|
|
char '\u0000' its given there!!! how about simple programs ??
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
|
|
'\u0000' is a valid char. Its bit value is 0000_0000_0000_0000, and it is called the null character. You can find it on this Unicode chart. You initialise a char exactly the same way you initialise anything else; put it to the left of an assignment operator (=) and put a char literal or an expression which is convertible to a char on the right of that, then a ; sign.
|
 |
 |
|
|
subject: how to initialize char??
|
|
|