Changed Java code works for me (see comments):
public interface IFace {
String message();
}
// Class should be public
public class A implements IFace {
@Override
public String message() {
return "Hello A!";
}
}
// Class should be public
public class B implements IFace {
@Override
public String message() {
return "Hello B!";
}
}
public class PrintHello {
// Method should be public
static public void print (IFace msg) {
msg.message();
}
}
(def a (A.))
(PrintHello/print a)