The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

help with console input strnig....

i have a console input class that works on buff = new BufferedInputStream(System.in);
it returns a string of the input ....
now when i use it the string that comes back is in some way different .
let say a input "abc" if i write the string it well print "abc" but if i use input.equals( "abc") it is false
here is my main...

M:/iPod_Control/Music \\input line
M:/iPod_Control/Music \\ replaceString result and return string
M:/iPod_Control/Music \\ seeIf is the string i what to get to....
not same \\ if statement shows that string are different
no files false

Re: help with console input strnig....

well thanks every one i found out the problem there was some how some space that got caught at the end of the input when the input stream ended so all i did is add a trim() method to the return from the consoleInput method and it worked ...

Re: help with console input strnig....

Originally Posted by mdstrauss

well thanks every one i found out the problem there was some how some space that got caught at the end of the input when the input stream ended so all i did is add a trim() method to the return from the consoleInput method and it worked ...

Ahhhh I was going to suggest that! Wanted to check the other things first. Glad you solved your problem