| Author |
System.out.println((char)-1) printing question mark
|
Azuritul Wu
Greenhorn
Joined: Apr 21, 2004
Posts: 8
|
|
Hello, In my program I write: System.out.println((char)-1); And the console output is ?.....Can anybody tell me why? Is this because Java don't recognize this character, so just transforms it to ? mark?
|
Preparing...
|
 |
Abhinay Verma
Greenhorn
Joined: Dec 13, 2004
Posts: 24
|
|
Yes You are right. If Java doesn't recognize the code, it will print '?'
|
 |
Azuritul Wu
Greenhorn
Joined: Apr 21, 2004
Posts: 8
|
|
Many thanks for your reply...
|
 |
 |
|
|
subject: System.out.println((char)-1) printing question mark
|
|
|