Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

System.out not working on eclipse

800396Jan 7 2009 — edited Jan 7 2009
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2009
Added on Jan 7 2009
18 comments
514 views