Home java Get ASCII Symbol

Get ASCII Symbol

Author

Date

Category

How to get a symbol on his code?

There is a table ASCII . I have a value from the Oct column. How to get a symbol for this meaning? I tried options but there was Dec .


Answer 1, Authority 100%

Oct is an octal number system (OCTAL). Use

int de = integer.parseint (Oct, 8);

To convert to 10-size (it will be the Dec – Decimal column), and then use

char c = (char) DEC;

To obtain a symbol ASCII.


Full example:

string oct = "053";
int de = integer.paraseint (Oct, 8);
System.out.PrintLN ("in decimal ss will be" + DEC);
System.out.PrintLN ("ASCII Sign will" + (Char) DEC);

In the end, we get in response + .

IDEONE

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions