About 564,000 results
Open links in new tab
  1. How to get the user input in Java? - Stack Overflow

    Mar 13, 2011 · The best two options are BufferedReader and Scanner.. The most widely used method is Scanner and I personally prefer it because of its simplicity and easy implementation, …

  2. java - How do I make a if-else statement with the string argument ...

    Nov 25, 2014 · I am writing a program that asks the user to input his name, address and phone number. When the data is entered the program shall print the data and ask the user to verify …

  3. java - Reading and checking strings from user input - Stack Overflow

    comparing a string to an input form user. java. 1. Validating User input strings. 0. Java check String input.

  4. How do you prompt a user for an input in java - Stack Overflow

    Nov 7, 2014 · Having imported java.util.Scanner, to get input from the user as a String, create a Scanner object that parameterizes System.in and assign userChoice the value of nextLine() …

  5. Java Scanner String input - Stack Overflow

    Mar 22, 2012 · The problem I'm having is that the Scanner.next() method only returns the first word before a space. So if the input is "My Birthday", the description of that instance of an …

  6. java - User input stored in a String array - Stack Overflow

    Since you know that you want to have an array of 20 string: String[] array = new String[20]; Then your for loop should use the length of the array to determine when the loop should stop. Also …

  7. Getting user input for string array in Java - Stack Overflow

    Mar 31, 2015 · Instead of input.nextInt() you can just put input.next() and that will get the next immediate string value entered. You can also do input.nextLine() if I remember right and that …

  8. java - Adding User Input to ArrayList - Stack Overflow

    Dec 28, 2014 · create array list entry String equals "" do this loop get input from user put it into entry String add entry String into array list while entry String doesn't equal "quit" for each item …

  9. java - Reversing a String from user's input - Stack Overflow

    Well, let's look at it with the word 'HELLO' as input. You can tell, that the length of the string is 5, and the first letter (H) has the index 0, the second letter 1, ... and the last one has the index 4, …

  10. parsing - How to parse strings in Java? - Stack Overflow

    Feb 4, 2017 · Final outcome should print out as follows: Enter input string: Jill, Allen First word: Jill Second word: Allen Enter input string: Golden , Monkey First word: Golden Second word: …

Refresh