Solved

Get ascii code of a string

Posted on 2006-07-20
6
1,157 Views
Last Modified: 2007-11-27
String str="A";

How do I get the ascii code of str?
0
Comment
Question by:william007
6 Comments
 
LVL 14

Expert Comment

by:StillUnAware
ID: 17144681
Charcter.codePointAt(str, 0);
0
 
LVL 35

Accepted Solution

by:
girionis earned 400 total points
ID: 17144682
int ascii = str.charAt(0)
0
 
LVL 14

Expert Comment

by:StillUnAware
ID: 17144683
typo:

Character.codePoint(str, 0); // where 0 is the index in the str string
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 30

Expert Comment

by:mayankeagle
ID: 17144749
What do you mean by ASCII code of the string? You can get ASCII code of individual characters as shown above.
0
 
LVL 24

Assisted Solution

by:sciuriware
sciuriware earned 100 total points
ID: 17144751
typo again:

     int i = Character.codePointAt(str, 0);

;JOOP!
0
 
LVL 9

Author Comment

by:william007
ID: 17264943
Thanks=)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now