scanner tag

9 questions


1 answers
134 views
0
Scanner's problem when using the nextLine() method after the nextXXX() method

The nextInt() and nextLine() methods of Scanner are used as follows to receive keyboard input. System.out.println(enter numerical value); int option;option = input.nextInt();//read numerical value fro...

2 years ago

1 answers
104 views
0
Please tell me how to get a long Java string (including spacing) and get an int and a string againㅠ n Error in nextLine()

//Using the Scanner class // Name, age, height, weight (up to decimal point 2), city, address (must be received even after spacing), and single status //print it outimport java.util.Scanner; public cl...

2 years ago

1 answers
120 views
0
JAVA duplex problem

Hello, everyoneI couldn't find an answer while solving the question, so I asked this question.Write the JAVA code to multiply a given input or get an additional table!• Note:– Use LOOP, IF/ELSE, and M...


1 answers
114 views
0
NoSuchElementException without reason

import java.util.Scanner;public class HelloWorld{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); System.out.println(a); }}I was making a simple prog...

2 years ago

1 answers
113 views
0
This is a question for the Java Scanner!

When I declare a field and declare a method after creating one class, if I need a scanner in several methods, should I declare and close the scanner for each method??And I created several classes, and...


1 answers
144 views
0
StringTokenizer and Scanner and String.Split

scanner of Java class to learn the difference between the three, and stringtokenizer split wondered. I know, separate Then why bother to work only in the strings only with split stringtokenizer scanne...


1 answers
91 views
0
What is the difference between BufferdReader and Scanner?

As far as I know, the method of reading data based on characters from a file is the Scanner and Buffered Reader methods. We also know that BufferedReader uses buffers to efficiently read files to avoi...


1 answers
81 views
0
I have a question about the triangular output and rhombus output using the Java scanner.

// Triangular scannerimport java.util.Scanner;public class Stars05 { public static void main(String[] args) { int line; Scanner input = new Scanner(System.in); System.out.print(How long is the line...

2 years ago

1 answers
88 views
0
I'm asking you a question about the sum using Java csv

I have to write a program that calculates the total by reading the csv file below using scanner. public class ScannerTest3 { public static void main(String[] args) throws Exception{ Scanner sc1 = ne...

2 years ago

© 2024 OneMinuteCode. All rights reserved.