Ad
  • Custom User Avatar

    Well, the problem clearly is Java can't find class MorseCodeDecoder that you should have implemented in your solution like this:

    public class MorseCodeDecoder {
        public static String decode(String morseCode) {
            // your brilliant code here, remember that you can access the preloaded Morse code table through MorseCode.get(code)
        }
    }
    
  • Custom User Avatar

    Hi Jolaf

    Im trying to run my code on CodeWars

  • Custom User Avatar

    Are you trying to run your tests here on CodeWars, or on your computer?

  • Default User Avatar

    Hi

    Could you please explain why the test case isn't working for Java.

    assertThat(MorseCodeDecoder.decode(".... . -.-- .--- ..- -.. ."), is("HEY JUDE"));
    ^
    symbol: variable MorseCodeDecoder
    location: class MorseCodeDecoderTest
    1 error

    java.lang.RuntimeException: /MorseCodeDecoderTest.java:8: error: cannot find symbol
    assertThat(MorseCodeDecoder.decode(".... . -.-- .--- ..- -.. ."), is("HEY JUDE"));
    ^
    symbol: variable MorseCodeDecoder
    location: class MorseCodeDecoderTest
    1 error