my interface:
interface UrlContentRetrieved {
fun onUrlContentRetrieved(content: String)
}
java code:
task.setListener(new UrlContentRetrieved() {
@Override
public void onUrlContentRetrieved(String content) {
parseResults(content);
}
});
is converted to
task.listener = UrlContentRetrieved { content -> parseResults(content) }
and i got error
Error:(31, 25) Interface UrlContentRetrieved does not have constructors