Link to home
Start Free TrialLog in
Avatar of william007
william007

asked on

Get ascii code of a string

String str="A";

How do I get the ascii code of str?
Avatar of StillUnAware
StillUnAware
Flag of Lithuania image

Charcter.codePointAt(str, 0);
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
typo:

Character.codePoint(str, 0); // where 0 is the index in the str string
What do you mean by ASCII code of the string? You can get ASCII code of individual characters as shown above.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of william007
william007

ASKER

Thanks=)