About 60 results
Open links in new tab
  1. java.util.scanner - How can I read input from the console using the ...

    Here in this program we will take the Scanner class to achieve the task. This Scanner class comes under java.util, hence the first line of the program is import java.util.Scanner; which allows the user to …

  2. What does "import java.util.Scanner;" mean? - Stack Overflow

    Nov 15, 2017 · What do the import statements at the beginning of files mean? As an example, this program calculates the total price which includes sales tax: import java.util.Scanner; public class …

  3. eclipse - how to import java.util.Scanner - Stack Overflow

    Jun 20, 2021 · Option 1: Downgrade Java. So, install e.g. adoptopenJDK's JDK11, then tell eclipse about it (Window -> preferences -> search in the filterbar for JRE -> add a new one -> Point at the …

  4. how to resolve the error while using Scanner class in java

    Feb 17, 2014 · `import java.util.Scanner;` You can keep the name sc for your Scanner but change java.util.Scanner in the body of your code to Scanner as you don't need to call the imported package …

  5. How Can I Import java.util.Scanner into Eclipse?

    May 31, 2022 · import java.util.Scanner; // It should be above the class public class ClassName{ } I have had a lot of issues with Eclipse in the past (specifically with suggestions popping up). If you are …

  6. Difference between java.util.Scanner and java.util.Scanner.*

    Apr 12, 2014 · What would the statement import java.util.Scanner.* do then? In this case there would be a compilation error, since the package java.util.Scanner would collide with the type java.util.Scanner.

  7. Compilation errors in simple Java program with Scanner

    Mar 25, 2017 · import java.util.*; public class Demo { public static void main (String [] args) { Scanner keyboard = new Scanner(System.in); System.out.print("Type your first ...

  8. "Scanner cannot be resolved to a type" how can i fix it?

    May 21, 2020 · You have not assigned any value to the scanner variable, the first step to using a scanner is importing the library, then assigning the scanner a variable like "sc" or "keyboard" (which I …

  9. methods - Can't import java.util.Scanner - Stack Overflow

    Mar 10, 2016 · I have been trying to create program that lets a user input a number of eggs to buy and calculates the price. I have tried using the scanner method to input the integer, but I can't seem to …

  10. Java: Importar clase Scanner en NetBeans

    Jul 4, 2024 · Ya lo había hecho así con esa linea (import java.util.Scanner;) y me tiraba exactamente el mismo error, pero habia agregado esa linea manualmente, estaba en el lugar que corresponde, …