sure, no problem, this seems to be a common issue when learning any language

your method declaration:
public static String reverseString(String input)has a return ^ value ^ of String, but an if statement evaluates booleans, if(true) or if(false).
you are looking for something along the lines of:
if ((reverseString(s1)).equals(s1))this compares the 2 Strings (properly) and returns a boolean as to whether they are equal.
One other thing, i noticed:
CODE
public static String reverseString(String input)
{
Stack<Character> st = new Stack<Character>( );
String s1;
StringBuilder sb = new StringBuilder ();
for (int i=0; i<s1.length(); ++i){
st.push (s1.charAt(i));
}
while (!st.empty()){
char c = st.pop();
sb.append(c);
}
return sb.toString();
}
}
you create a variable s1 in this method, but you do not initialize it. It is also determining the for loop's run time, which will by none, since s1.length = 0
I assume this is just a mistake from changing variable names, and you are using it as if it were in the scope of your main method, s1 does nothing in the method, so it should be more like this:
CODE
public static String reverseString(String input)
{
Stack<Character> st = new Stack<Character>( );
//removed s1 creation
StringBuilder sb = new StringBuilder ();
for (int i=0; i<input.length(); ++i){ //replaced s1 for input
st.push (input.charAt(i)); //replaced s1 for input
}
while (!st.empty()){
char c = st.pop();
sb.append(c);
}
return sb.toString();
}
}
feel free to ask more questions about clarification, or brand new ones