Find the answer to your Linux question:
Results 1 to 2 of 2
Got book on Java programing and it is always using: import java.util.Scanner; There is no Scanner thing in the debian .jar thing, have looked. So what do I use instead? ...
  1. #1
    Linux Newbie lugoteehalt's Avatar
    Join Date
    Jan 2004
    Posts
    231

    what's java.util.Scanner in Debian's java?

    Got book on Java programing and it is always using:

    import java.util.Scanner;

    There is no Scanner thing in the debian .jar thing, have looked.

    So what do I use instead? It is something for reading stuff in from the keyboard. Thanks any help.
    All power is violence; all power is evil.
    Money As Debt

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    It's possible that the version of Java you're using in Debian is 1.4.2 or below. The Scanner class was only added in Java 1.5. I've never used it, but from what I can tell it just breaks up a string into tokens. For that purpose I generally use StringTokenizer. For information on it, see the Java 1.4.2 API:

    Java 2 Platform SE v1.4.2
    Registered Linux user #270181
    TechieMoe's Tech Rants

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •