java.util.Scanner problem
Author |
Message |
Williugly
|
Posted: 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!  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: 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) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
|
|