Results 1 to 5 of 5

Thread: Converting numbers to other languages?

Threaded View

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Resolved Converting numbers to other languages?

    Anyone know a way to take an integer and convert it to it's representation in another language? I tried this and it dosen't seem to convert the number over. Thanks.
    Code:
     import java.io.*;
     import java.text.*;  
     import java.util.*;
    
     try{
       BufferedReader buff = new BufferedReader(
       new InputStreamReader(System.in));
        String input = buff.readLine(); 
        NumberFormat nf = NumberFormat.getInstance(Locale.CHINESE);
        Number converted = nf.parse(input);
        System.out.println(converted.shortValue()); 
       }catch(IOException io){
         System.err.println(io); 
        }catch(Exception e){
         System.err.println(e); 
        }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width