What it the java equivalent of javascript’s:
String.fromCharCode(n1, n2, ..., nX)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That would be something like as follows:
Note that casting to
charisn’t guaranteed to work because the codepoint value might exceed the upper limit ofchar(65535). Thecharwas established in the dark Java ages when Unicode 3.1 wasn’t out yet which goes beyond 65535 characters.Update: the
Stringhas actually a constructor taking anint[](introduced since Java 1.5, didn’t knew it from top of head), which handles this issue correctly. The above could be simplified as follows: