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

为什么用dw做的网站打不开wordpress非插件oss

为什么用dw做的网站打不开,wordpress非插件oss,建网站空间都有什么平台,凡科网站建设教学视频1.static 修饰符应用范围 static修饰符只能用来修饰类中定义的成员变量、成员方法、代码块以及内部类(内部类有专门章节进行讲解)。 2.static 修饰成员变量 static 修饰的成员变量称之为类变量。属于该类所有成员共享。 示例 package cn.lyxq.test04;public class Chinese…

1.static 修饰符应用范围

static修饰符只能用来修饰类中定义的成员变量、成员方法、代码块以及内部类(内部类有专门章节进行讲解)。

2.static 修饰成员变量

static 修饰的成员变量称之为类变量。属于该类所有成员共享。

示例

package cn.lyxq.test04;public class ChinesePeople {private String name;private  int age;public static String country = "中国";public ChinesePeople(String name,int age){this.name = name;this.age = age;}public String getName() {return name;}public void setName(String name) {this.name = name;}public int getAge() {return age;}public void setAge(int age) {this.age = age;}
}
package cn.lyxq.test04;public class ChinesePeopleTest {public static void main(String[] args) {ChinesePeople cp1 = new ChinesePeople("张三",20);System.out.println(ChinesePeople.country);ChinesePeople.country="日本";ChinesePeople cp2 = new ChinesePeople("李四",30);System.out.println(ChinesePeople.country);ChinesePeople cp3 = new ChinesePeople("王五",32);System.out.println(ChinesePeople.country);}}

如果类变量是公开的,那么可以使用 类名.变量名 直接访问该类变量

3.static 修饰成员方法

static 修饰的成员方法称之为类方法,属于该类所有成员共享。

package cn.lyxq.test04;public class ChinesePeople {private String name;private  int age;private static String country = "中国";public ChinesePeople(String name,int age){this.name = name;this.age = age;}public String getName() {return name;}public void setName(String name) {this.name = name;}public int getAge() {return age;}public void setAge(int age) {this.age = age;}//类方法public static String getCountry() {return country;}//类方法public static void setCountry(String country) {ChinesePeople.country = country;}
}
package cn.lyxq.test04;public class ChinesePeopleTest {public static void main(String[] args) {ChinesePeople cp1 = new ChinesePeople("张三",20);ChinesePeople.setCountry("日本");ChinesePeople cp2 = new ChinesePeople("李四",30);System.out.println(ChinesePeople.getCountry());ChinesePeople cp3 = new ChinesePeople("王五",32);System.out.println(cp3.getCountry());//不是最优访问方式}}

如果类方法是公开的,那么可以使用 类名.方法名直接访问该类方法。

4.static 修饰代码块

static 修饰的代码块被称为静态代码块,在JVM第一次记载该类时执行。因此,静态代码代码块只能执行一次,通常用于一些系统设置场景。

package cn.lyxq.test04;public class ChinesePeople {private String name;private  int age;//使用static修饰的成员变量称为类变量,不会随着成员变化而变化,属于所有成员共享private static String country ;//static修饰的代码块称为静态代码块,在JVM第一次加载该类的时候执行,只能执行一次static{country = "中国";System.out.println("country属性已经被赋值");}public ChinesePeople(String name,int age){this.name = name;this.age = age;}public String getName() {return name;}public void setName(String name) {this.name = name;}public int getAge() {return age;}public void setAge(int age) {this.age = age;}//类方法public static String getCountry() {return country;}//类方法public static void setCountry(String country) {ChinesePeople.country = country;}
}
package cn.lyxq.test04.test;import  cn.lyxq.test04.ChinesePeople;public class ChinesePeopleTest {public static void main(String[] args) {ChinesePeople cp = new ChinesePeople("张三",20);}}

5.static内存

http://www.yayakq.cn/news/942940/

相关文章:

  • 北京品牌网站建设网站博客自媒体轻松
  • 开淘宝店怎么做充值网站网站建设早会说什么
  • 互联网网站分了花生壳建设网站
  • 郓城建设局网站网站优化目标
  • 上海网站推广很好国际网站建设公司
  • 上海网站优化推广彩虹网站建设
  • 家庭网络做网站椒江网站建设
  • 网站源代码制作建商城网站需要多少钱
  • html5 手机网站开发叫才有什么检索标准的网站
  • 人人设计网官方网站建设网站需要注意什么
  • 莱芜做网站的商家有哪些宁波依众网络科技有限公司
  • 网站建设公众微商软文范例大全100
  • 杭州城乡建设厅网站网址缩短在线生成
  • 12306的网站是哪个公司做的wordpress菜单没有了
  • 网站服务对生活的影响seo优化技术培训
  • 国内外基于vue框架的网站建设现状工程公司总经理年终总结
  • 江宁区住房与城乡建设局网站购物app下载
  • 做网站买虚拟服务器wordpress 时间调用
  • 湖南网站服务网页游戏排行榜前十名wangyi
  • 惠州做网站的公司盐城外贸网站建设
  • 自己网站上做淘宝搜索引擎在线制作图片加闪光字
  • 豪利777的seo综合查询嘉兴seo网络推广
  • 学校学不到网站建设网站调用微信数据
  • 做简单网站代码房子
  • 网站卡密代理怎么做互联网营销师报考
  • 如何做好集团网站建设it企业网站模板下载
  • 最专业的网站建设组织wordpress 注册赠送
  • 相册管理网站模板下载失败猴痘的预防措施
  • 西安网站建设公司排行榜做网站送的手机站是什么
  • 马鞍山市网站建设公司移动网站seo