About 2,930,000 results
Open links in new tab
  1. Java User Input (Scanner class) - W3Schools

    To use the Scanner class, create an object of the class and use any of the available methods found in the Scanner class documentation. In our example, we will use the nextLine() method, …

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

    When you're programming in Java, the operator == is generally used for comparing primitive data types (int, double, etc.). If you use == for comparing two object types (like strings), you're …

  3. Java User Input – Scanner Class - GeeksforGeeks

    Apr 22, 2025 · A string is a sequence of characters. In Java, objects of the String class are immutable, which means they cannot be changed once created. In this article, we are going to …

  4. Java Scanner (With Examples) - Programiz

    // read input from a string . Here, we have created objects of the Scanner class that will read input from InputStream, File, and String respectively. The Scanner class provides various methods …

  5. How to Get User Input in Java - Stack Abuse

    Sep 13, 2023 · In this article, we'll use the Scanner, BufferedReader and InputStreamReader classes to get user input in Java. We'll also implement a custom InputStream class for …

  6. How to Input a String in Java? - JavaBeat

    Jan 31, 2024 · To input a string in Java, use the built-in methods of the Scanner, Console, or BufferedReader class or provide the input via the Command-Line args. The Scanner class is …

  7. String Input in Java - First Code School

    Jun 19, 2023 · By the end of the article, readers will understand how to take string input efficiently and effectively in Java. To declare a string variable in Java, use the String keyword. Follow it …

  8. Java User Input – Scanner, BufferedReader and Console - Intellipaat

    May 14, 2025 · Java offers a number of methods – Scanner, BufferedReader, and Console – to read various kinds of input such as strings, numbers, and characters. Each input method is …

  9. java - Getting Keyboard Input - Stack Overflow

    Jul 9, 2013 · In java we can read input values in 6 ways: Scanner Class; BufferedReader; Console class; Command line; AWT, String, GUI; System properties; Scanner class: present in …

  10. How to Take String Input in Java - Methods Explained | upGrad

    Nov 3, 2024 · Learn how to take string input in Java using Scanner, BufferedReader, and Command Line Arguments. Follow best practices with examples and FAQs for beginners.

  11. Some results have been removed
Refresh