This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am implementing a project and a small of that project is accepting input from user through command line. I have written the following code to do that
The problem i am facing is that the user has to press Enter twice to send the input. As you all can see, i have even tried to do the same thing using Scanner class. Can you guys suggest me what i am missing.
Here is the entire class that i wrote. This is part of an Instant Messenger project. The run method of this class doesnt run in a separate thread. It is a plain Method. It is called from some other class. I basically tried quite a few things like:
Using Flush/ Without using Flush
Using Scanner Class/Without using scanner class
The snippet that i posted above is from the doChat() method.
Joined: Oct 13, 2005
Your posted code is too long to read, and does not appear to contain the two flush() calls you originally posted.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com