ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

interfaces.zs 303B

1234567891011121314151617
  1. public interface MyInterface {
  2. interfaceMethod() as string;
  3. }
  4. public class MyClass {
  5. val name as string;
  6. public this(name as string) {
  7. this.name = name;
  8. }
  9. public implements MyInterface {
  10. interfaceMethod() => "InterfaceMethod " + name;
  11. }
  12. }
  13. println(new MyClass("hello").interfaceMethod());