How to implement Java interface anonymously in scala?

Viewed 4565

Suppose I have a Java inteface

public interface Bar {

  public void baz(String st)
  public void jaz()
}

I want to implement above interface anonymously in scala within a function body like:

def foo() = {
val bar : Bar = new Bar() {
// how to do that ?


 }

}
2 Answers
Related