Java: String, Char, If, Error
<p>I am having trouble making a file, I think I have got the majority of it correct, but I'm having trouble getMorseCode() method. I am almost positive it begins with </p>

<pre><code>String morse = "";
</code></pre>

<p>however, since letter is a char and morse is a string, it results in an error. Otherwise it complies but simply returns a space when I run the tester I'm not sure what to put in the quotation marks though, can anyone give me a hint please?</p>

<p>Thanks,</p>

<pre><code>public class MorseCode
{
    private char letter;

    public MorseCode(char let)
    {
    letter = let;

    }

    public char getLetter()
    {
        return letter;

    }

    public String getMorseCode()
    {
        String morse = "";
            if (morse.equalsIgnoreCase("a"))
                morse = ".-";







        return morse;
    }

}

import java.util.Scanner;

/**
 * A class to test the MorseCode class
 */
public class MorseCodeTester
{
    /**
     * Tests methods of the MorseCode class
     * @param args not used
     */
    public static void main( String args[] )
    {
        Scanner input = new Scanner(System.in);

        System.out.print("Enter a character: ");
        char morseChar = input.nextLine().charAt(0);
        MorseCode one = new MorseCode(morseChar);
        System.out.println(one.getLetter() + " is " + one.getMorseCode() + " in morse!\n");
</code></pre>
