Anyone know how to make a Switch statement to ask the user for a number and then convert it to a single Chinese character and print it out?
I just need a small example so I can get started. So far I got the unicode for Chinese characters.
4E8C = 1 in chinese
4E09 = 2
1
Expert's answer
2012-05-18T11:50:19-0400
import java.util.Scanner;
public class Test {
public static void main(String[] args) { Scanner in = new Scanner(System.in); String usersChoise = in.next(); char result = ' '; switch (usersChoise.charAt(0)) { case '1': result = 0x4E8C; break; case '2': result = 0x4E09; break; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment