> "Can it really be that hard to figure out how to open stdin?"
? In most runtimes stdin is opened before you start. Certainly is true in the case of Java.
> So to answer the interview question, all I need to do is open stdin.
No, you also need to "open" stdout. More importantly, you have to figure out how to read and write to streams without losing data (which you'd think would be easy but evidence indicates otherwise).
? In most runtimes stdin is opened before you start. Certainly is true in the case of Java.
> So to answer the interview question, all I need to do is open stdin.
No, you also need to "open" stdout. More importantly, you have to figure out how to read and write to streams without losing data (which you'd think would be easy but evidence indicates otherwise).