Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes how to get ascii value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to get ascii value" Watch "how to get ascii value" New topic
Author

how to get ascii value

Subhash Pavuskar
Ranch Hand

Joined: Jun 29, 2011
Posts: 57

Can any one tell me the solution to asii value of user input string or char or integer:
below program which i wrote is not working properly please do help me....

Shinil Mohan
Ranch Hand

Joined: Aug 24, 2011
Posts: 37

Hi Subhash,
I have used something like below to get the ASCII from String, but I am not sure this is the effective way of getting the same. We can wait for more expert views, but this works for me.

Shinil Mohan
Ranch Hand

Joined: Aug 24, 2011
Posts: 37

Also can you use a better subject line that reflect the issue you are having instead of "Hello everyone" when you posting anything.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
Welcome to the Ranch

The problem is that you never reassign x from its original value of 0.
Subhash Pavuskar
Ranch Hand

Joined: Jun 29, 2011
Posts: 57

Thank you Shinil and next time onwards ll use proper subject line. Thanks for guiding me.
Through your code i solved my problem
Shinil Mohan
Ranch Hand

Joined: Aug 24, 2011
Posts: 37

You are welcome
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

I'm glad you already got an answer. I edited the subject for you so others with the same question read this thread.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Subhash Pavuskar
Ranch Hand

Joined: Jun 29, 2011
Posts: 57

Thanks Jeanne ...
this is the solution which may help for others !!!





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get ascii value
 
Similar Threads
Problem with char/string representation
I/O code exception
Array of ten numbers
I/O
How to print ASCII values of all characters?