Help me out with this code. I'm unable to find the error

import java.util.*;
public class Main
{
static Scanner scn =new Scanner(System.in);
public static void main(String[] args)
{
System.out.println(“Enter a string”);
String str=scn.next();
System.out.print(alphabeticallyGreater(str));

}
static String temp="";
static String answer="";
public static String alphabeticallyGreater(String str)
{
    temp=str.substring(0,1);
    if(str.length()<2||str==null)
    {
        return str;
    }
    else
    {
        if(temp.compareTo(str.substring(1,2))>1)
        {
            answer+=str.substring(0,1);
        }
        else
        {
            answer+=temp;
            temp=str.substring(1,2);
        }
        alphabeticallyGreater(str.substring(0,str.length()-1));
        return answer;
    }
}

}

please share your code by saving it on ide.codingblocks.com .the way you have shared has a lot of errors