-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.6
-
x86
-
windows_nt
Name: tb29552 Date: 07/15/98
/* When I use the Character.getNumericValue method it
* does not return the unicode value. Here is some
* source code that demonstrates the problem.
*
* This demo code returns -1 for all punctuation,
* indicating that there is no value for spaces or any
* type of punctuation. Yet last time I checked these
* characters had unicode values.
*/
import java.io.*;
public class CharacterTest{
public static void main(String arg[]){
String string=null;
//DataInputStream in=new DataInputStream(System.in);
BufferedReader in = new BufferedReader
(new InputStreamReader(System.in));
while(true){
System.out.print("input>");
try{string=in.readLine();} catch(IOException e){}
System.out.println("\n"+Character.getNumericValue(string.charAt(0)));
}
}
}
(Review ID: 34561)
======================================================================
- duplicates
-
JDK-4233482 java.lang.Character.getNumericValue has misleading description
-
- Resolved
-