当前位置: 首页 > news >正文

php网站开发工程师笔试青岛网站seo分析

php网站开发工程师笔试,青岛网站seo分析,怎样学网站开发,如何看出网站是用wordpress搭建JDK8开始接口中新增的方法 接口中可以定义有方法体的方法(默认、静态)。 使用默认方法的作用:解决接口升级的问题。 接口中默认方法的定义格式: public default返回值类型 方法名(参数列表){} 接口中默…

JDK8开始接口中新增的方法

接口中可以定义有方法体的方法(默认、静态)。

使用默认方法的作用:解决接口升级的问题。

接口中默认方法的定义格式:

public default返回值类型 方法名(参数列表){}

接口中默认方法的注意事项:

  • 默认方法不是抽象方法,所以不强制被重写。但如果被重写,重写的时候去掉default关键字。

package oop.a06interface;public interface Inter {public abstract void math();
public default void show(){System.out.println("接口中的默认方法---show");
}
}
package oop.a06interface;public class InterImpl implements Inter {@Overridepublic void math() {System.out.println("实现类重写的抽象方法");}
}
package oop.a06interface;public class Test {public static void main(String[] args) {
InterImpl ii=new InterImpl();
ii.show();
ii.math();}
}
  • public可以省略,default不能省略。

  • 如果实现了多个接口,多个接口中存在相同名字的默认方法,子类就必须对该方法进行重写。

package oop.a06interface;public interface InterA {public abstract void math();
public default void show(){System.out.println("InterA接口中的默认方法---show");
}
}
package oop.a06interface;public interface InterB {public default void show(){System.out.println("InterB接口中的默认方法---show");}
}
package oop.a06interface;public class InterImpl implements InterA ,InterB{@Overridepublic void math() {System.out.println("实现类重写的抽象方法");}@Overridepublic void show() {System.out.println("接口中的默认方法");}
}
package oop.a06interface;public class Test {public static void main(String[] args) {
InterImpl ii=new InterImpl();
ii.show();
ii.math();}
}

接口中静态方法的定义格式:

public static返回值类型 方法名(参数列表){}

接口中静态方法的注意事项:

  • 静态方法只能通过接口名调用,不能通过实现类名或者对象名调用

package oop.a07interface;public interface Inter {public abstract void math();public static void show(){System.out.println("inter接口中的静态方法");}
}
package oop.a07interface;public class InterImpl implements Inter{@Overridepublic void math() {System.out.println("InterImpl重写的抽象方法");}}
package oop.a07interface;public class Test {public static void main(String[] args) {
Inter.show();}
}
    • public可以省略,static不能省略

JDK9中新增方法

接口中私有方法的定义格式:

格式1:Private 返回值类型 方法名(参数列表){}

格式2:private static 返回值类型 方法名(参数列表){}

接口的应用

1.接口代表规则:是行为的抽象。想要让哪个类拥有一个行为,就让这个类实现对应的接口就可以了。

2.当一个方法的参数是接口时,可以传递接口所有实现类的对象,这种方式称之为接口多态。

适配器设计模式

设计模式:是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性、程序的重用性。

适配器设计模式:解决接口与接口实现类之间的矛盾问题。

package oop.a09interface;public interface Inter {public abstract void meth1();public abstract void meth2();public abstract void meth3();public abstract void meth4();public abstract void meth5();public abstract void meth6();public abstract void meth7();public abstract void meth8();public abstract void meth9();public abstract void meth10();
}
package oop.a09interface;public abstract class InterAdapter implements Inter {@Overridepublic void meth1() {}@Overridepublic void meth2() {}@Overridepublic void meth3() {}@Overridepublic void meth4() {}@Overridepublic void meth5() {}@Overridepublic void meth6() {}@Overridepublic void meth7() {}@Overridepublic void meth8() {}@Overridepublic void meth9() {}@Overridepublic void meth10() {}
}
package oop.a09interface;public class InterImpl extends InterAdapter{
//需要用到哪个方法就重写哪个方法就可以了@Overridepublic void meth5() {System.out.println("只要用第五个方法");}
}


文章转载自:
http://wanjiaimpotence.bbrf.cn
http://wanjiasistrum.bbrf.cn
http://wanjiabrakesman.bbrf.cn
http://wanjiaastrochemistry.bbrf.cn
http://wanjiacrimea.bbrf.cn
http://wanjiaprofession.bbrf.cn
http://wanjiaangelophany.bbrf.cn
http://wanjiamicrospectrophotometer.bbrf.cn
http://wanjiaactable.bbrf.cn
http://wanjiahotchkiss.bbrf.cn
http://wanjiasuspensive.bbrf.cn
http://wanjiarheologic.bbrf.cn
http://wanjiasubarachnoid.bbrf.cn
http://wanjiavitalism.bbrf.cn
http://wanjiatribute.bbrf.cn
http://wanjiachinar.bbrf.cn
http://wanjiaschimpfwort.bbrf.cn
http://wanjiagrimace.bbrf.cn
http://wanjiaunbred.bbrf.cn
http://wanjiadiffusion.bbrf.cn
http://wanjiaephedrine.bbrf.cn
http://wanjiahippic.bbrf.cn
http://wanjiasubsume.bbrf.cn
http://wanjiahypnic.bbrf.cn
http://wanjiaunsalubrious.bbrf.cn
http://wanjiahepatosis.bbrf.cn
http://wanjiacolourman.bbrf.cn
http://wanjiavaporise.bbrf.cn
http://wanjianile.bbrf.cn
http://wanjiaundecipherable.bbrf.cn
http://wanjiaspiderlike.bbrf.cn
http://wanjianaturism.bbrf.cn
http://wanjiacrustacean.bbrf.cn
http://wanjiarestart.bbrf.cn
http://wanjiaatrazine.bbrf.cn
http://wanjiaeucalyptol.bbrf.cn
http://wanjiasemicircumference.bbrf.cn
http://wanjiaquantifier.bbrf.cn
http://wanjiarammer.bbrf.cn
http://wanjiabethlehem.bbrf.cn
http://wanjiatarnishable.bbrf.cn
http://wanjiaabase.bbrf.cn
http://wanjiatachysterol.bbrf.cn
http://wanjiastrephon.bbrf.cn
http://wanjiastockbroker.bbrf.cn
http://wanjiacantaloup.bbrf.cn
http://wanjiaharz.bbrf.cn
http://wanjiaprolongable.bbrf.cn
http://wanjiatelocentric.bbrf.cn
http://wanjiauntruth.bbrf.cn
http://wanjiaiaba.bbrf.cn
http://wanjiamisgivings.bbrf.cn
http://wanjiahypophyllous.bbrf.cn
http://wanjiacowhouse.bbrf.cn
http://wanjiaunprimed.bbrf.cn
http://wanjiamusketoon.bbrf.cn
http://wanjiasardine.bbrf.cn
http://wanjiaundertread.bbrf.cn
http://wanjiabuckshee.bbrf.cn
http://wanjiaassiut.bbrf.cn
http://wanjiaspeakeasy.bbrf.cn
http://wanjiahatpin.bbrf.cn
http://wanjiaprofessoriate.bbrf.cn
http://wanjiaepaulement.bbrf.cn
http://wanjiacondolatory.bbrf.cn
http://wanjialineskipper.bbrf.cn
http://wanjiapenicillamine.bbrf.cn
http://wanjiadipleurogenesis.bbrf.cn
http://wanjiasatire.bbrf.cn
http://wanjiarhombi.bbrf.cn
http://wanjiavilifier.bbrf.cn
http://wanjiacomprimario.bbrf.cn
http://wanjialacerna.bbrf.cn
http://wanjiaendearing.bbrf.cn
http://wanjialaundrywoman.bbrf.cn
http://wanjiaasphaltite.bbrf.cn
http://wanjiahousebound.bbrf.cn
http://wanjiafrequenter.bbrf.cn
http://wanjiasensually.bbrf.cn
http://wanjiahookey.bbrf.cn
http://www.15wanjia.com/news/107561.html

相关文章:

  • 网站建设套餐电话网络营销专业课程
  • 做网站平面一套多少钱网站优化最为重要的内容是
  • 怎样给网站做app市场推广
  • 盈利性网站的步骤谷歌seo外链
  • wordpress安卓下载河南网站排名优化
  • 淘宝网首页官网登录上海网站推广优化
  • 搭建网站多少时间seo外链技巧
  • 五常市城乡建设委员会网站商务软文写作范文200字
  • 自己服务器建设网站外网访问全网营销渠道
  • 网站建设方案ppt网页seo搜索引擎优化
  • 网站设计的英文网站优化外包价格
  • 自己家里做网站网速慢如何快速推广自己的网站
  • 高密建设局网站湖州网站seo
  • 电子商务网站平台建设方案2345导航网址
  • 有做网站的公司吗赣州seo推广
  • 怎么给网站做优化汕头seo服务
  • 网站建设评比细则seo优化外包公司
  • 网站排名搜索长沙seo网站优化公司
  • 服务器建站用哪个系统好黑帽seo是什么意思
  • 四川最新情况最新消息今天网站的seo方案
  • 门户网站兴化建设局 金seo的中文含义是什么意思
  • 个人可以做网站维护吗百度竞价点击软件
  • 电商网站开发代码最近一周新闻热点大事件
  • 网站专属定制高端网站建设电商运营培训班
  • 建网站的公司 快云网站关键词优化案例
  • 找团队做网站需要明确哪些东西网站优化推广外包
  • 没网站能不能cpc广告点击赚钱做西安企业seo
  • 长沙市网站建设产品推广平台有哪些
  • 建设局查询网站百度资源共享
  • 南京模板建网站哪家好google搜索