About 484,000 results
Open links in new tab
  1. java - Take a char input from the Scanner - Stack Overflow

    Dec 19, 2012 · Scanner reader = new Scanner(System.in); char c = reader.nextChar(); This method doesn't exist. I tried taking c as a String. Yet, it would not always work in every case, …

  2. char - nextChar () in java - Stack Overflow

    Why do you think getting a String input is inefficient? What do you think is slower or less efficient, Java's getting in a String and extracting a char or the user's typing in a char or chars?

  3. java - Why doesn't the Scanner class have a nextChar method?

    Sep 12, 2013 · This is really a curiosity more than a problem... Why doesn't the Scanner class have a nextChar() method? It seems like it should when you consider the fact that it has next, …

  4. java - If I'm scanning for input, how do I accept a single character …

    Jan 22, 2012 · In class, we've learned the Scanner class for input, so we say Scanner keyboard = new Scanner(System.in) and then if we wanted to scan an integer, one would say num = …

  5. java - Scanner method to get a char - Stack Overflow

    Apr 8, 2010 · What is the Scanner method to get a char returned by the keyboard in Java. like nextLine() for String, nextInt() for int, etc.

  6. java - Cannot find Symbol for char - Stack Overflow

    The nextChar() method does not exist for a Scanner. input.next() will return a String. You'll have to replace char item with String item and item = Character.toUpperCase(item) with item = …

  7. java - How to read an input file char by char using a Scanner?

    Nov 13, 2012 · I have to use Scanner, so is there a nextChar() instead of nextLine() method that I could use? Thanks!

  8. java - console.nextChar (); ??? [SOLVED] | DaniWeb

    Hi everyone, I need your help please What do i need to make my program read the next character using console.nextChar(); I've added the following: ...

  9. How can I enter "char" using Scanner in java? - Stack Overflow

    Apr 16, 2014 · I have a question how can I enter char using Scanner in java? Such as for integer number Scanner input=new Scanner(System.in); int a = input.nextInt(); but how can I do the …

  10. java - Как использовать Scanner для char? - Stack Overflow на …

    Mar 17, 2019 · В классе Scanner есть для int метод nextInt(), для double метод nextDouble(), для String метод nextLine(), а какой есть для char?