• 516052 (unregistered)

    Java is like the Lebel Model 1886. A good idea slightly ahead of its time and thus implemented poorly. We had to wait until C# to see it done right.

  • (nodebb)

    This reminds me of the people who take the fizzbuzz interview question and add 30 unasked-for features.

    IANA Java dev, but the answer the newbie needed was something close to

    String string = System.in.readline();

    Everything else depends on what needs to be done once that string is in hand.

    Addendum 2026-10-07 07:54: Dammit Markdown; there was supposed to be a newline between the prose and code

  • Hmmmm 🤨 (unregistered)

    This seems like a bad compromise between teaching about keypress detect and reading from stdin...

  • no (unregistered)

    i am of the opinion that languages shouldn’t do what c++ does, using a generic std::pair for everything that is an ordered pair, and that they should have more specific purpose‐made types instead.

    today i learned there are people of the opinion that a specific purpose‐made type like java’s java.util.Map.Entry is fine to use as a generic ordered pair, even for things that aren’t even remotely map entries.

  • 516052 (unregistered)

    I agree with no here. To me pair implies that there is a relationship between the two values that goes beyond just tuple. Like key-value or such. Better to make your own struct.

  • Rob (unregistered)

    Calling Scanner a wrecking ball goes too far, considering there are only two real alternatives - using Console (not available unless actually called from the CLI) or wrapping System.in in an InputStreamReader wrapped in a BufferedReader. In fact, wrapping System.in in a Scanner is the third example on Scanner's own Javadoc page.

Leave a comment on “A Tool for You”

Log In or post as a guest

Replying to comment #705113:

« Return to Article