About 11,900,000 results
Open links in new tab
  1. How do you perform arithmetic on values produced by Scanner in java ...

    Sep 18, 2016 · Try to use double. double ValuePerHamper, NumAvalable, NumHampersMade; Scanner sc = new Scanner(System.in); System.out.println("Enter the number of items …

  2. Java: Divide two numbers and print on the screen - w3resource

    Apr 1, 2025 · The above Java code takes two integer numbers as input from the user, performs division, and displays the result. It uses the "Scanner" class for input, divides 'a' by 'b', and …

  3. Java User Input (Scanner class) - W3Schools

    Java User Input. 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 …

  4. Java Scanner Class Tutorial With Examples - Software Testing Help

    Apr 1, 2025 · In this tutorial, we will discuss How to Import and Use the Scanner Class of Java along with its Various Methods, Scanner API, and Examples: We have already seen the …

  5. Scanner Class in Java - GeeksforGeeks

    Apr 11, 2025 · In Java, the Scanner class is present in the java.util package is used to obtain input for primitive types like int, double, etc., and strings. We can use this class to read input …

  6. Java Scanner class with examples - BeginnersBook

    Sep 11, 2022 · In this tutorial, you will learn Java Scanner class and how to use it in java programs to get the user input. This is one of the important classes as it provides you various …

  7. java - How to put a Scanner input into an array... for example a …

    Jul 10, 2018 · Scanner input = new Scanner(System.in); double[] numbers = new double[5]; for (int i = 0; i < numbers.length; i++) System.out.println("Please enter number"); numbers[i] = …

  8. Java Scanner Tutorial and Code Examples - CodeJava.net

    Jul 29, 2019 · In this Java File IO tutorial, you will understand how the Scanner class works with various examples which you can use for your daily Java coding. * How does a Scanner work? …

  9. Java Scanner – A Comprehensive Guide With Examples (2021)

    Mar 8, 2021 · Java.util is a package in Java that has a class called Scanner. This class is used to obtain input from the user during runtime. The Scanner input in Java should be of primitive …

  10. Java Scanner (With Examples) - Programiz

    The Scanner class of the java.util package is used to read input data from different sources like input streams, users, files, etc. In this tutorial, we will learn about the Java Scanner and its …

  11. Some results have been removed
Refresh