![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
aimul
这个作者很懒,什么都没留下…
展开
-
idea @Override is not allowed when implementing interface method
近期研究idea,在编码过程发现报错:@Override is not allowed when implementing interface method 。找到一个老外的回答,感觉挺有用的,记录下来,以供参考:1、在project/module上,右键选择菜单“Open Module Settings” ;2、选择Modules,修改“Language Level” 为 “8-Lambdas,…转载 2017-08-20 11:13:41 · 190 阅读 · 0 评论 -
设计模式之适配器模式
定义:适配器模式将一个类的接口,转换成客户期望的另一个类的接口,适配器让原本接口不兼容的类可以合作无间(headfirst设计模式)代码块接口A public interface A { void a(); }接口B public interface B { void b(); }B的实现类 public class BImpl implements B { @Overrid原创 2017-10-11 10:14:16 · 140 阅读 · 0 评论