When I take a String input using BufferedReader, for eg.:
String a=br.readLine();
and after that when I type:
if(a=="hello")
{//statements}
else{....}
then even if the user enters 'hello' as string a, it never executes the statements in the if block and just jumps to else. I don't face this problem when I directly take a string input in the parameter list of a method without using buffered reader. What is wrong? and how else can I take string input using buffered reader without facing this problem?Please help. p.s. there is no syntax error in my program