Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Character to String coversion

Trying to create a string object from a char of value 0x1E, but each time I try it, it changes the value from  0x1E to 0x2E.

Need assistance with this regards.
0
slickdeals
Asked:
slickdeals
1 Solution
 
CEHJCommented:
Please post your code. Try
char c = '\u001e';
String s = "" + c;

Open in new window

0
 
MicheleMarconCommented:
Which compiler/IDE are you using?

And of course: are you sure to have saved the file before compiling?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now