Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
scanner
- Page 1
Re: Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by JamesCherrill
… try to read it with int num =
scanner
.nextInt(); String name =
scanner
.nextLine(); ... and name is an empty String… - in which case you can junk the whole
scanner
and use a BufferedReader instead. new BufferedReader(new InputStreamReader…System.in)) 3. Use this class instead of
Scanner
: https://www.daniweb.com/programming/code/506346/a-…
Re: Scanner and arraylist of objects
Programming
Software Development
15 Years Ago
by JamesCherrill
Scanner
line = new
Scanner
(line); This looks wrong. There is no constructor for
Scanner
that takes a
Scanner
as a parameter.
Re: Scanner - Int then String
Programming
Software Development
13 Years Ago
by NormR1
… be tricky. The
Scanner
buffers input and can block waiting for input. Or it … in the buffer. Your next attempt to get something from
Scanner
will be to get "word". nextInt() will fail…
Re: Scanner based file access and parsing
Programming
Software Development
12 Years Ago
by JamesCherrill
Scanner
is "A simple text
scanner
", you can't use it to parse a binary file. Have a look at DataInputStream which reads binary data - although you may need to write a bit of code to handle text that's encoded as zero delimited bytes
Re: Scanner or BufferedReader ?
Programming
Software Development
13 Years Ago
by StephNicolaou
Scanner
is the better option. Also because it has a lot more methods including the boolean methods to check a wide range of input types before to you begin implementing a certain function. As well as pattern matching and find in line, etc. It's a lot more easier to use.
Scanner?
Programming
Software Development
13 Years Ago
by Tremillian
… it possible to use jython to import pictures from a
scanner
? If so, what module would I start with/use? The…
scanner
is an old Onetouch 9320 USB. I would totally use …
Re: Scanner?
Programming
Software Development
13 Years Ago
by FALL3N
- run an automator action from python to get the image from the
scanner
AND/OR use the PIM package to deal with images.. I think it's still in early stages, but its a python image manipulation package.
Scanner help
Hardware and Software
Hardware
16 Years Ago
by sta822
my
scanner
will no longer scan, it says it is being used by another program. how do i find what is using it so i can stop it or delete it?
Scanner nextLine() Stops at Number?
Programming
Software Development
12 Years Ago
by coolbeanbob
… main(String[] args) { ExpressionTree calc;
Scanner
console = new
Scanner
(System.in); // Allow for a command-…Character.toString(op); } } TreeNode root = null; public ExpressionTree(
Scanner
input) { root = build(input); } /** * Based on…
Scanner Input from Keyboard help
Programming
Software Development
16 Years Ago
by yingfo
…class PostEval { static public void main(String args[]) {
Scanner
scanner
= new
Scanner
(System.in); Stack<String> postFix = new Stack…: "); while(
scanner
.hasNext()) { String letter =
scanner
.next(); char equals=(
scanner
.next()).charAt(0); int number =
scanner
.nextInt(); System.out.…
Scanner and arraylist of objects
Programming
Software Development
15 Years Ago
by KimJack
…
Scanner
scanner
= new
Scanner
(file).useDelimiter(","); while (
scanner
.hasNextLine()) { String line =
scanner
.nextLine(); String name =
scanner
.next(); int serial =
scanner
.nextInt(); double itemCost =
scanner
…
Re: Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by Violet_82
…private static final
Scanner
scanner
= new
Scanner
(System.in); public int getUserInput() { //
Scanner
scanner
= new
Scanner
(System.in); int…} public String getUserInputForProcessing(String action) { //
Scanner
scanner
= new
Scanner
(System.in); System.out.printf("You …
Scanner with multiple delimiters and data types
Programming
Software Development
12 Years Ago
by scippi
…(fileName);
Scanner
scanner
= new
Scanner
(dataFile); cohort =
scanner
.nextLine(); int numberOfResponses = Integer.parseInt(
scanner
.nextLine());…read in the feedback values {
Scanner
scanner2 = new
Scanner
(
scanner
.nextLine()); scanner2.useDelimiter("[ ]*(,)[…
Re: Scanner nextLine() Stops at Number?
Programming
Software Development
12 Years Ago
by coolbeanbob
I've tried "4+8". It throws an unhandled exception. I've tested the
Scanner
object (using "4 + 8") before it's passed to ExpressionTree. It only contains "4", so I'm pretty sure the problem is in how the
Scanner
is working.
Re: Scanner and arraylist of objects
Programming
Software Development
15 Years Ago
by sneaker
… a java.util.InputMismatchException here is a snippet: [code]
Scanner
line = new
Scanner
(line); line.useDelimiter(","); while(line.hasNext()) {…QUOTE] Hi In the example above you have named your
scanner
as line and your string as line. Thats is …
Re: Scanner nextLine() Stops at Number?
Programming
Software Development
12 Years Ago
by coolbeanbob
deceptikon, you are right. I have the
Scanner
working now, but it does not consider the white space. Do you think TreeNode::build creates all the nodes and builds the entire tree? I was under the impression this method only built individual nodes.
Re: Scanner and arraylist of objects
Programming
Software Development
15 Years Ago
by KimJack
… the right direction. I am trying to use a
scanner
to parse a string and use its elements with methods… a java.util.InputMismatchException here is a snippet: [code]
Scanner
line = new
Scanner
(line); line.useDelimiter(","); while(line.hasNext()) {…
Scanner and nextInt() problem
Programming
Software Development
14 Years Ago
by Dannyo329
… the user for the employee's contact number: [CODE]
Scanner
Scan = new
Scanner
(System.in); out.print("\nEnter Employee Contact Number….InputMismatchException at java.util.
Scanner
.throwFor(Unknown Source) at java.util.
Scanner
.next(Unknown Source) at java.util.
Scanner
.nextInt(Unknown Source) at…
Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by Violet_82
… method getUserInputForProcessing that takes the action and there
scanner
takes an input but it's not passing…delete(); break; } } public String getUserInputForProcessing(String action) {
Scanner
scanner
= new
Scanner
(System.in); System.out.printf("You chose %s: &…
Re: Scanner and nextInt() problem
Programming
Software Development
14 Years Ago
by javaAddict
… an integer number? Usually when I got that exception with
scanner
it was because of that. Because I see this at….InputMismatchException at java.util.
Scanner
.throwFor(Unknown Source) at java.util.
Scanner
.next(Unknown Source) at java.util.
Scanner
.nextInt(Unknown Source) at…
Re: Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by JamesCherrill
… pretty much guaranteed. The general rules is create one
Scanner
at startup and use it for all your console input… throughout the program. ps:
Scanner
comes with its own set of problems, eg the infamous… into that anyway - does the userChoice value come froma
Scanner
nextInt?) If you are just reading lines then you're…
Re: Scanner or BufferedReader ?
Programming
Software Development
16 Years Ago
by chili5
…parse it with the Integer class.
Scanner
: [CODE]
Scanner
sin = new
Scanner
(new FileReader("DATA1.txt"…(y); } } [/CODE] Also I can have
Scanner
that parses each individual element in a String. So …to the store, to catch frogs!";
Scanner
sin = new
Scanner
(sText); while (sin.hasNext()) { System.…
scanner class and switch statments
Programming
Software Development
17 Years Ago
by rich345
… trying to make a program that if you use a
scanner
class you can type A and then the switch statment… would read a letter into a
scanner
would be by using this [code]
Scanner
scan = new
Scanner
(System.in); System.out.print ("… thought could i not read the string in using the
scanner
class and then convert the string to an int so…
scanner object wont resolve ?????
Programming
Software Development
14 Years Ago
by therstonsplace
…is my only line of code i still get the
Scanner
object wont resolve. (of course my public static … tm website but its not under classes... is the
Scanner
object deprecated and not in use.. is it not … the way cuz i know this helps import java.util.
Scanner
; class WhoCares { public static void main (String args[]) { } } …
Re: Scanner library error
Programming
Software Development
15 Years Ago
by cgeier
Change the following line from: [code]
Scanner
number = new
Scanner
( System.in ); [/code] To: [code] static
Scanner
number = new
Scanner
( System.in ); [/code] OR …main method: [code] public static void main(String[] args) {
Scanner
number = new
Scanner
( System.in ); int firstValue; System.out.print( "…
Re: Scanner library error
Programming
Software Development
15 Years Ago
by Teethous
… the following line from: [code]
Scanner
number = new
Scanner
( System.in ); [/code] To: [code] static
Scanner
number = new
Scanner
( System.in ); [/code] OR …main method: [code] public static void main(String[] args) {
Scanner
number = new
Scanner
( System.in ); int firstValue; System.out.print( "Please…
Re: Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by JamesCherrill
… even though they're duly closed Closing a System.in
Scanner
is not just useless, it's a problem. System.in… buffers input and so do Scanners. When you close a
Scanner
anything that happens to be in its buffers is lost…
Re: Scanner not passing control to the keyboard
Programming
Software Development
5 Years Ago
by Violet_82
thanks. I only closed the
scanner
as eclipse was somplaining about that. I remove the close statments and now everything work. However I will use only one
scanner
as you suggested. Thanks
Scanner does not respond to commands and freezes my computer
Hardware and Software
Hardware
20 Years Ago
by tommy
… hooked it up to my G4 Mac, The
scanner
goes on when I start the computer but when…I cannot scan by using the buttons on the
scanner
either. It also will not allow me to change… the preferences. Everything freezes. I had the
scanner
plugged in through a Belkin TetraHub but I got … laptop G4 and a different model HP
scanner
and works perfectly.
scanner problem or software problem
Hardware and Software
Hardware
19 Years Ago
by smashssingh
… retrievable image files.So it uses the HP
scanner
.But problem is that
scanner
closes working after month.Then network engineer goes… and uninstall the driver of that
scanner
.After this he installs the driver again.Then
scanner
starts to work.This problem occuers…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC