Greetings...
I am no longer a newbie on Java, but I have been facing an issue lately that I have been unable to resolve myself, even though it seems to be something so silly.
I have been using eclipse for development, and by developing a simple "Just to practice" code I have found myself unable to use System class or any of its methods at a certain point. See the code below:
package one;
import java.util.Scanner;
public ClassOne {
public static void main (String args[]){
Scanner reader = new Scanner(System.in); /*Works just fine here*/
int x = 0;
System.out.println("Type in the number of objects expected"); /*Does not work at all, like if System was something I could not use at all. Not an identifier */
Scanner readertwo = new Scanner(System.in); /*System does not work here either*/
}
}
Even if I rewrite the code after that, by erasing the import statement and all other System references in the code, System does not work again.
If anybody has ever faced the same issue and knows what I am doing wrong and what I can do to fix it, I'd really be grateful.
Thanks to all, and happy 2009.
Santana T