This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get ascii value

 
Subhash Pavuskar
Ranch Hand
Posts: 57
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48910
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

The problem is that you never reassign x from its original value of 0.
 
Subhash Pavuskar
Ranch Hand
Posts: 57
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm glad you already got an answer. I edited the subject for you so others with the same question read this thread.
 
Subhash Pavuskar
Ranch Hand
Posts: 57
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne ...
this is the solution which may help for others !!!





 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic