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

Username:   Password: 
 RegisterRegister   
 java.util.Scanner problem
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Williugly




PostPosted: Wed Aug 01, 2012 2:46 am   Post subject: java.util.Scanner problem

Hey guys,

I just got into programming with Java and I'm currently using the ready to program compiler. Looking through tutorials, I came across the package java.util.Scanner which I had a problem
importing with the IDE Ready to Program Java compiler. While it seems that it works for the eclipse compiler that the tutorial guy is using, the same command does not work in ready to program IDE which I am using. Is there any way to fix this?

Here would be the code that I was working with:

import java.util.Scanner;

class sample{
public static void main(String args[]){
Scanner test = new Scanner(System.in):
System.out.println(test.nextLine());
}
}


Thank You! Sad
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Aug 01, 2012 3:22 am   Post subject: RE:java.util.Scanner problem

Documentation ( http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Scanner.html ) says that Scanner became available in Java 5; while Ready to Program uses the older Java 4. (It will help to understand that Ready is essentially a collection of custom classes and comes bundled with an outdated version of the language. As such, there are no guarantees of compatibility with standard Java; although older language features might work in Ready)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: