Java實現動態代理示例

首先定義一個接口ide public interface IStars { void sing(); void dance(); } 其中有兩個對應star的方法,dance和sing;測試 而後定義一個star類來實現這個接口this public class Stars implements IStars { private String name; p
相關文章
相關標籤/搜索