Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 User input with Ready to Program (Holtsoft) without using the hsa console?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic
Author Message
Rickkwa




PostPosted: Tue Mar 29, 2011 3:13 pm   Post subject: User input with Ready to Program (Holtsoft) without using the hsa console?

Yeah, so I'm wondering how to get user input using Ready and without using the hsa console. I think I found it on a site before and I was able to get integers at the very least, but I forgot the site and how to do it.
 
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Tue Mar 29, 2011 3:16 pm   Post subject: RE:User input with Ready to Program (Holtsoft) without using the hsa console?

code:
Scanner in = new Scanner ( System.in )


Alternately, use any of the other classes in java.io.* ; the simplest way is still to use Scanner.
 
Rickkwa




PostPosted: Tue Mar 29, 2011 8:04 pm   Post subject: Re: User input with Ready to Program (Holtsoft) without using the hsa console?

I mentioned Ready to Program because it's using an older version of java (i think) and scanner isn't built in.
 
Tony




PostPosted: Tue Mar 29, 2011 8:09 pm   Post subject: RE:User input with Ready to Program (Holtsoft) without using the hsa console?

java.io.InputStream has been available since 1.0 (and yes, Scanner has been introduced in Java 5)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
 
DemonWasp




PostPosted: Tue Mar 29, 2011 9:26 pm   Post subject: RE:User input with Ready to Program (Holtsoft) without using the hsa console?

*facepalm*

You're right, Scanner isn't available in Ready (Java 1.4.2, as I recall now).

You will need to use InputStream / Reader and the Integer.parseInt, Double.parseDouble, etc methods.

Or, you could use a JVM that's less than 9 years old (and at least 6.5 years out of date). I strongly, strongly recommend this latter case -- usage of Java 1.4 has dropped off drastically, largely due to Java 1.5 and 1.6 (and 1.7, assuming they ever release it) being vastly superior.
 
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: