package cn.edu.bjut.chapter4; interface Drawable { void draw(); default void msg() { System.out.println("default method"); } static int cube (int x) { return (x * x * x); } } class Circle implements Drawable { @Override public void draw() { System.out.println("drawing circle"); } } public class InterfaceNewFeatureTester { public static void main(String[] args) { Drawable d = new Circle(); d.draw(); d.msg(); System.out.println(Drawable.cube(3)); } }