Is the scanner in java not thread safe?
I'm interested in using java.util.Scanner . I was reading the docs and saw a line saying A Scanner is not safe for multi threaded use without external synchronization. Can I confirm that this means that two separate Scanner objects in two separate threads operating on two separate files could interfere with each other? Can anyone help me to synchronise scanner object externally to use for safe thread operation? Terrible Tadpole If you use the same instance of Scanner in two threads you will have trouble unless you synchronise access to the object. But two separate instances of Scanner will