AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem exception with netbeans 4.1

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Joseph KHOURY
Guest





PostPosted: Sat Apr 29, 2006 4:12 am    Post subject: problem exception with netbeans 4.1 Reply with quote



Hello,

I have a problem with my program with netBeans 4.1 can you help me?
---------------------------------------------

import java.util.Scanner;

public class Create
{
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
System.out.println("press any key");
String stop = s.nextLine();
}
}

I don t have any problem with the console mode. But with netBeans 4.1 I
have the folowing exception :

press any key

Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Scanner.java:1471)
at Create.main(Create.java:8)

Do you have any idea?

Thanks for help
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.