About 2,440,000 results
Open links in new tab
  1. java - Beginner: How to return user input? - Stack Overflow

    Apr 2, 2017 · I'd assume you need to return new Target(input.nextInt()), but for that you would need an appropriate constructor in Target class. The code of Tarhet would be greatly …

  2. Java User Input (Scanner class) - W3Schools

    The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the class and use any of the available methods found in the …

  3. Java User Input Methods: Best Practices and Examples

    Jul 25, 2025 · Explore various Java methods for capturing user input from the console, including Scanner, BufferedReader, and Console classes, with practical code examples and …

  4. Getting User Input in Java: A Comprehensive Guide

    Jun 12, 2025 · Whether you are building a simple console application or a complex graphical user interface (GUI), handling user input is an essential part of the development process. This blog …

    Missing:
    • Return Method
    Must include:
  5. How to Get User Input in Java: A Comprehensive, Practical Guide

    Dec 27, 2023 · These classes provide methods for retrieving input from the keyboard, files, network streams, and other sources. In the next sections we‘ll explore how to use each …

    Missing:
    • Return Method
    Must include:
  6. Best Ways to Capture User Input in Java (With Examples)

    Feb 14, 2025 · Explore the best ways to capture user input in Java, with practical examples using Scanner, BufferedReader, Console, and more.

  7. Java return Keyword - GeeksforGeeks

    Jan 2, 2025 · Explanation: In the above example, the return statement in Java does not need to be the last line in a method but must be the last to execute. The demoFunc method exits early …

  8. Java: How to create a method from a user input - Stack Overflow

    Jan 29, 2020 · I am new to Java and I am trying to figure out how I can use methods from a value that a user has entered. I have used the Java scanner and understand how this works but I …

  9. Taking User Input in Java: A Comprehensive Guide

    Jun 9, 2025 · We provided clear code examples for each method and discussed common practices and best practices for taking user input in Java. By following these concepts, …

    Missing:
    • Return Method
    Must include:
  10. How to accept User Input in Java (Examples and Practice)

    Aug 7, 2024 · Learn how to take user inputs in Java with this beginner-friendly guide. Discover string and integer inputs, handling multiple inputs, and practical examples to enhance your …