Questions tagged as 'scanner'

2
answers

Using the Java Scanner

I was doing an exercise for the university using the class Scanner and something unusual happened, watch the code. for(int i = 0; i < 11; i ++){ //problema(esta pulando a escolha de um dos jogadores, precisamente o jogador 1) Sys...
asked by 28.08.2014 / 13:40
3
answers

Why does the Scanner return an error in something that is expected?

Note that I typed a number, a text, and a number, as you request. import java.util.Scanner; class Ideone { public static void main (String[] args) { Scanner entrada = new Scanner(System.in); int valor1 = entrada.nextInt();...
asked by 14.12.2017 / 16:01
3
answers

Solution for scanning documents by browser

I want users to% direct from the browser to then pro server . I found APIS that do this but all are paid and the costly licenses! Can anyone present a solution? Even if the client has to install a plugin or something that outputs...
asked by 05.03.2016 / 07:37
4
answers

Error Loop Java Class Scanner

When I use the nextLine () method in place of next () in the code below, code interactions are skipped and some fields are left blank. import java.util.Scanner; public class turma { public static void main (String args[]) { final...
asked by 28.10.2014 / 07:51
2
answers

Check string value

I wanted you to check if the value entered is vegetarian, and if it is, print on the user's screen is vegetarian as the code follows, however when I type vegetarians or anything else it alerts you that it is not. import java.util.Scanner; publ...
asked by 22.03.2015 / 21:04
2
answers

nextInt () after the third integer

Given the example.csv: nome;idade;10;21;32;43;54 I can use the Scanner class to read such a file. Using the .useDelimiter() method and taking advantage of ; to get each value. So I use .next() for nome and...
asked by 06.11.2018 / 17:20
2
answers

What are the differences between InputStreamReader and Scanner in Java?

I was aware of reading data by Scanner , I know its operation superficially, however I came across some examples using a class called InputStreamReader for reading data. What are the differences between these approaches and if th...
asked by 03.03.2015 / 01:10
1
answer

Execute Java class passing parameters to the Scanner

We are creating a Java programming championship and would like students to make an algorithm that reads from a scanner and computes a particular mathematical logic and returns it to the system output. Until this point OK. The problem is that...
asked by 04.05.2016 / 05:16
1
answer

Obtain image from just one sector in a scanner (python)

Good afternoon! I need to develop a python application and I can not get the program to get an image of a sector of the scanner, only the whole area that the scanner can scan (approximately one A4 sheet). I'm still a beginner in language. My...
asked by 20.09.2015 / 22:48
1
answer

Scanner is not picking up all lines

I have a file with 7 million lines, but my code takes a maximum of 63000 and does not return any error. Scanner sc2 = null; try { sc2 = new Scanner(new File("./assets/words.txt")); } catch (FileNotFoundException e) { e....
asked by 27.07.2017 / 20:06