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...
import java.io.*; import java.util.*; public class DemoGeter { public static void main(String[] args) { String inputS = new String(ConsoleInput.readLine()); String result = ReplaceString.replaceString(inputS); // replaces some of the chars (file separator) prints the result..... System.out.println(result); String seeIf = new String("M:/iPod_Control/Music"); System.out.println(seeIf); if (seeIf.equals(result)) System.out.println("same"); else System.out.println("not same");
here is the output for input " M:/iPod_Control/Music"
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


LinkBack URL
About LinkBacks
Reply With Quote
by clicking the
button on their useful posts. 