scanner

Checking the input data BufferedReader

I started studying Java. I got to the input from the console. There are two ways, or I found only two: a scanner and a buffer ... correct code, for example, to enter an int value. I understand that you need to check for non-emptiness and the type of int?

How can I write two words as a variable in the input String Scanner method? jetbrains academy challenge

package com.Scanner; import java.util.Scanner; public class Scaner { public static void main(String[] arg ... ence, fusion dishes. Output The form for Nick is completed. We will contact you if we need a chef that cooks fusion dishes.

java.util. Scanner, hasNext... (); & next... (); Working with object memory

What's going on?! How do the methods of the Scanner class next... (); and hasNext... (); work with memory? Example: import ja ... se chips and cases are painted in detail - I do not know. As well as what generally happens in the second case?! Please help!

InputMismatchException when working with the scanner

Why does an error occur if you uncomment a commented-out line? In the file, one line is exactly the same as assigned to the ... .Scanner.nextInt(Scanner.java:2076) at Metro.readMetro(Metro.java:21) at Metro.main(Metro.java:64) "376 933" "376 933"

Features of using scanner. nextLine()

I have this code. String anun=sc.nextLine(); System.out.println("age:"); int tar=sc.nextInt(); System.out.println("email:") ... " + mail); And always, when the time comes for String mail=sc.nextLine();, the step is simply skipped. What is the problem?

Strange characters when entering Russian letters (Cyrillic) in Java

import java.util.Scanner; public static void main(String[] args) { Scanner n = new Scanner (System.in); String fio ... letters, it outputs incomprehensible characters. How to fix it? Tell me, if you can, example, I work in NetBeans IDE 8.0.1.

java.util.InputMismatchException

Help me figure it out, I'm a newbie. Mistake: Exception in thread "main" java.util.InputMismatchException at ja ... ()); rezultat=cheslo1 + cheslo2; System.out.print("Результат:"); System.out.print(rezultat); } }

System.in. read() or still Scanner?

Noticed in many books used: System.in.read() is to get something from the keyboard. Why is the Scanner class not used there? ... anner.nextInt(); I searched on Stackoverflow and didn't find any differences between System.in.read and the Scanner class.

How to use Scanner for char?

In the Scanner class, there is a int method for nextInt(), a double method for nextDouble(), a String method for nextLine(), and what is there for char?

How to use an existing variable as a counter

My goal is to take the letter of the alphabet that the user typed and show, as many times as they type, the predecessor and s ... } } It turns out that I have to use the value of the Alpha[i] that is inside the IF in the for's, but how do I do that?

Why does the Scanner return error on something that is within expected?

Note that I typed, a number, a text and a number, as you ask there. import java.util.Scanner; class Ideone { public sta ... w why it gives error, what to do to solve, and if you do not have the way if Victor Stafusa's solution is the best available.

Solution to scan documents by browser

I want users digitalizem documentos Direct from browser to then upar Pro Server. I found APIs that do this but all are p ... well and seems to be easier to achieve, but of course if there is a pluginthat directly accesses the scanner even better.

NoSuchElementException error when capturing data entry with Scanner

I'm having problems with data entries using the Scanner with JOptionPane works fine. Exception in thread "main" java.util.N ... (IllegalArgumentException e) { System.out.println(e.getMessage()); } entrada.close(); } }

Scanner.nextLine does not pick up information after Scanner.nextInt [duplicate]

this question already has answers here : ... PROVADO(A)"); } else { System.out.println("Status: REPROVADO(A)"); } } }

Delphi + Scanner Integration

Anyone knows any component or way to integrate an application made in Delphi XE2 + Scanner, I need to save what is being scanned.

Error using scanner.close()

I'm trying to run this code in Java, using Eclipse. The same performs once normal. When trying to repeat the operation (choos ... stem.out.println("Você escolheu a opção 1.\n"); break; } }while (opcao != 0); } }

Circumference area

Good night! I'm starting in Java, and I'm trying to complete the URI circumference area challenge. Is giving a lot of problem ... area = Math.pow(raio,2) * n; System.out.println("A=" +area); } } What am I doing wrong? I appreciate it now.

How to read a float with Scanner

My problem is as follows: package com.vreawillsaveyou01; import java.util.Scanner; public class Main { public static ... extFloat(Scanner.java:2496) at com.vreawillsaveyou01.Main.main(Main.java:8) What am I doing wrong and how can I correct it?

Clear buffer scanner Fujitsu Fi-7160 in c#

I'm working on a company Project, C # Windows Form and I'm still a beginner on the dot net platform. I would like to know wit ... while (acquireModalState != AcquireModalState.None); imageIndex--; return ret; } }

Java Build error (Eclipse) using Scanner class, beginner problem

I am starting to study Java now by the book "Java how to program 10th Ed" and I am having difficulty compiling this code from ... System.out.printf("%s balance: $%.2 %n%n", account2.getName(), account2.getBalance()); input.close(); } }