You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Martin Wichter (Jira)" <ji...@apache.org> on 2021/06/03 20:40:00 UTC
[jira] [Updated] (NETBEANS-5747) Basic user console input will not
accept input
[ https://issues.apache.org/jira/browse/NETBEANS-5747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Wichter updated NETBEANS-5747:
-------------------------------------
Description:
// The folloinw short program runs fine but there is no way to input anything?
// It runs fine using Windows 10 CMD
// I am new to Apache NetBeans so the answer is probably obvious.
// I have tried typing text on the same line and the prompt and the next it will not accept anything
import java.util.*;
public class UserInput {
public static void main(String args[]) {
// Create Scanner Object
Scanner cons = new Scanner(System.in);
// Output the question
System.out.println("Enter line of text: ");
// Wait for user input
String str = cons.nextLine();
//display user input
System.out.println("You entered this: " + str);
}
}
was:
// The folloinw short program runs fine but there is no way to input anything?
// It runs fine using Windows 10 CMD
// I am new to Apache NetBeans so the answer is probably obvious.
// I have tried typing text on the same line and the prompt and the next it will not accept anything
import java.util.*;
public class UserInput {
public static void main(String args[]) {
// Create Scanner Object
Scanner cons = new Scanner(System.in);
// Output the question
System.out.println("Enter line of text: ");
// Wait for user input
//String line = input.nextLine();
String str = cons.nextLine();
//display user input
System.out.println("You entered this: " + str);
}
}
> Basic user console input will not accept input
> ----------------------------------------------
>
> Key: NETBEANS-5747
> URL: https://issues.apache.org/jira/browse/NETBEANS-5747
> Project: NetBeans
> Issue Type: Bug
> Reporter: Martin Wichter
> Priority: Critical
>
> // The folloinw short program runs fine but there is no way to input anything?
> // It runs fine using Windows 10 CMD
> // I am new to Apache NetBeans so the answer is probably obvious.
> // I have tried typing text on the same line and the prompt and the next it will not accept anything
>
> import java.util.*;
> public class UserInput {
> public static void main(String args[]) {
> // Create Scanner Object
> Scanner cons = new Scanner(System.in);
>
> // Output the question
> System.out.println("Enter line of text: ");
>
> // Wait for user input
> String str = cons.nextLine();
>
> //display user input
> System.out.println("You entered this: " + str);
>
>
> }
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists