This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Java Input

 
David Lafo
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi, im trying to write a java program that allows for conversions to different bases. The conversions aren't the hard part its the input that is giving me trouble. I can only use System.in.read for my input. I was hoping someone could help me and show me how this is done because when i input the number i get the ascii value and i dont know how to convert it from a char to an int. i need up to a five digit number for my input. I was hoping someone could teach me how to do the input properly by casting the number from a char to an int after the input. This would be greatly apprecieated and I thank in advance anyone who can help me with this problem. As you can probably tell im relatively new to java so in other words could you dumb it down for me .
Thankyou
David
 
Jason Menard
Sheriff
Posts: 6450
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi and welcome to JavaRanch. For future reference, please avoid cross-posting the same question to multiple forums. This question has been answered in the duplicate thread in I/O, so I'm going to close this one. Please direct further discussion there.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic