I am wondering what it would take to make something like this work:
using System; class Program { static void Main() { var f = new IFoo {
You could have something like anonymous classes in Java:
using System; class Program { static void Main() { var f = new IFoo() { public String Foo { get { return "foo"; } } public void Print() { Console.WriteLine(Foo); } }; } } interface IFoo { String Foo { get; set; } void Print(); }