how to compare the string which is passed as a parameter
the following method is not working.
String str = \"saveMe\" compareString(str) def
This line:
if(str2==${str}){
Should be:
if( str2 == str ) {
The ${ and } will give you a parse error, as they should only be used inside Groovy Strings for templating
${
}