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

wordpress网站的根目录在哪里河南纯手工seo

wordpress网站的根目录在哪里,河南纯手工seo,庄河做网站,2345浏览器电脑版首页二维数组 静态二位数组 理解#xff1a;二维数组中包含了多个一维数组 声明#xff1a; 数据类型 变量名;--推荐 数据类型 变量名; //静态初始化1//String[][] names new String[][]{{小红,小绿,小蓝},{小黄,小紫…二维数组 静态二位数组 理解二维数组中包含了多个一维数组 声明 数据类型 变量名;--推荐 数据类型 变量名; //静态初始化1//String[][] names new String[][]{{小红,小绿,小蓝},{小黄,小紫,小黑,小粉}};//静态初始化2//String[][] names;{小红,小绿,小蓝},{小黄,小紫,小黑,小粉}//names new String[][]{};//静态初始化3String[][] names {{小红,小绿,小蓝},{小黄,小紫,小黑,小粉}};//设置指定下标上的元素names[1][0] 小明; ​//获取指定下标上的元素String str names[1][0];System.out.println(获取指定下标上的元素 str);//获取长度System.out.println(获取二维数组中一维数组的长度 names.length);//2System.out.println(获取二维数组中第一个一维数组元素的长度 names[0].length);//3System.out.println(获取二维数组中第二个一维数组元素的长度 names[1].length);//4 ​//遍历数组 -- forfor (int i 0; i names.length; i) {for (int j 0; j names[i].length; j) {System.out.println(names[i][j]);}}System.out.println(-------------------------------);//遍历数组 -- foreachfor (String[] ss : names) {for (String element : ss) {System.out.println(element);}} 动态二维数组 //动态初始化1 -- 2表示一维数组3表示每个一维数组元素的个数//String[][] names new String[2][3];//动态初始化2 -- 2表示一维数组3表示每个一维数组元素的个数String[][] names;names new String[2][3];//设置指定下标上的元素names[0][0] 小红;names[0][1] 小黄;names[0][2] 小绿;names[1][0] 小蓝;names[1][1] 小紫;names[1][2] 小黑;//获取指定下标上的元素String str names[1][0];System.out.println(获取指定下标上的元素 str);//获取长度System.out.println(获取二维数组中一维数组的长度 names.length);//2System.out.println(获取二维数组中第一个一维数组元素的长度 names[0].length);//3System.out.println(获取二维数组中第二个一维数组元素的长度 names[1].length);//3//遍历思路依次遍历二维数组中的一维数组再遍历一维数组中的元素System.out.println(-------------------------------); ​//遍历数组 -- forfor (int i 0; i names.length; i) {for (int j 0; j names[i].length; j) {System.out.println(names[i][j]);}}System.out.println(-------------------------------);//遍历数组 -- foreachfor (String[] ss : names) {for (String element : ss) {System.out.println(element);}}/*** 扩展* boolean bool true; -- boolean值在内存中占4字节因为底层使用int类型表述* boolean[] bs {true,false}; -- 数组里的boolean值在内存中占1字节因为底层使用byte类型表述*/ ​* 需求使用动态初始化创建二维数组二维数组中有两个一维数组* 第一个一维数组有3个元素* 第二个一维数组有4个元素public static void main(String[] args) {String[][] names new String[2][];String[] s1 {小红,小绿,小蓝};String[] s2 {小黄,小紫,小黑,小粉};names[0] s1;names[1] s2;for(String[] ss : names){for (String element : ss) {System.out.println(element);}} ​ 数组五子棋 package Test01; ​ import java.util.Scanner; ​ public class Test01 {public static void main(String[] args) {//棋盘长度int length20;//棋盘容器String[][] gobangnew String[length][length];//棋盘符号String add ┼;String black ●;String white ○;String[] nums {⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛}; ​//初始化棋盘for (int i 0; i gobang.length; i) {for (int j 0; j gobang[i].length; j) {if(jlength-1){//每行的最后一列 -- 设置行数gobang[i][j]nums[i];}else if(ilength-1){//最后一行 -- 设置列数gobang[i][j]nums[j];}else{gobang[i][j]add;}}}for(String[] arr : gobang){for(String element : arr){System.out.print(element);}System.out.println();} ​boolean flagtrue;//true表示黑子false表示白子 ​Scanner scan new Scanner(System.in);boolean bool true;while(bool){//输入坐标System.out.println(请输入((flag)?黑:白)子坐标);int xscan.nextInt()-1;int yscan.nextInt()-1; ​//判断下标是否超出棋盘范围if(x0||ylength-2||y0||ylength-2){System.out.println(落子失败--坐标上已经有棋子);continue;} ​//落子String piece(flag)?black:white;gobang[x][y]piece; ​//打印棋盘for(String[] arr : gobang){for(String element : arr){System.out.print(element);}System.out.println();} ​//判断输赢if(method01(gobang, x, y, piece)5 || method02(gobang, x, y, piece)5 || method03(gobang, x, y, piece)5 || method04(gobang, x, y, piece)5){System.out.println(((flag)?黑:白)赢得了比赛);boolfalse;} ​//置反flag!flag; ​}//关闭资源scan.close(); ​} ​//获取左右方向棋子的连接数public static int method01(String[][] gobang,int x,int y,String piece){ ​int count 1; ​//判断左横向int tempY y;while(tempY0){tempY--;if(gobang[x][tempY].equals(piece)){count;}else{break;}} ​//判断右横向tempY y;while(tempY18){tempY;if(gobang[x][tempY].equals(piece)){count;}else{break;}} ​return count;} ​//获取上下方向棋子的连接数public static int method02(String[][] gobang,int x,int y,String piece){int count 1;//判断上方int tempX x;while(tempX0){tempX--;if(gobang[tempX][y].equals(piece)){count;}else{break;}} ​//判断下方tempX x;while(tempX18){tempX;if(gobang[tempX][y].equals(piece)){count;}else{break;}} ​return count; ​} ​//获取右上/左下方向棋子的连接数public static int method03(String[][] gobang,int x,int y,String piece){int count 1;//判断右上int tempX x;int tempY y;while(tempX0tempY18){tempX--;tempY;if(gobang[tempX][tempY].equals(piece)){count;}else{break;}} ​//判断左下方tempX x;tempY y;while(tempX18tempY0){tempX;tempY--;if(gobang[tempX][tempY].equals(piece)){count;}else{break;}} ​return count;} ​//获取左上/右下方向棋子的连接数public static int method04(String[][] gobang,int x,int y,String piece){int count 1;//判断左上int tempX x;int tempY y;while(tempX0tempY0){tempX--;tempY--;if(gobang[tempX][tempY].equals(piece)){count;}else{break;}} ​//判断右下方tempX x;tempY y;while(tempX18tempY18){tempX;tempY;if(gobang[tempX][tempY].equals(piece)){count;}else{break;}} ​return count;} ​ } ​
文章转载自:
http://www.morning.qcdhg.cn.gov.cn.qcdhg.cn
http://www.morning.znmwb.cn.gov.cn.znmwb.cn
http://www.morning.nldsd.cn.gov.cn.nldsd.cn
http://www.morning.rfpb.cn.gov.cn.rfpb.cn
http://www.morning.fppzc.cn.gov.cn.fppzc.cn
http://www.morning.jfbpf.cn.gov.cn.jfbpf.cn
http://www.morning.jtfcd.cn.gov.cn.jtfcd.cn
http://www.morning.wmpw.cn.gov.cn.wmpw.cn
http://www.morning.zwhtr.cn.gov.cn.zwhtr.cn
http://www.morning.xgcwm.cn.gov.cn.xgcwm.cn
http://www.morning.xsklp.cn.gov.cn.xsklp.cn
http://www.morning.wqbfd.cn.gov.cn.wqbfd.cn
http://www.morning.ntffl.cn.gov.cn.ntffl.cn
http://www.morning.nktgj.cn.gov.cn.nktgj.cn
http://www.morning.cgthq.cn.gov.cn.cgthq.cn
http://www.morning.xhgxd.cn.gov.cn.xhgxd.cn
http://www.morning.lsqxh.cn.gov.cn.lsqxh.cn
http://www.morning.ghxkm.cn.gov.cn.ghxkm.cn
http://www.morning.plfy.cn.gov.cn.plfy.cn
http://www.morning.monstercide.com.gov.cn.monstercide.com
http://www.morning.dxqfh.cn.gov.cn.dxqfh.cn
http://www.morning.mfmrg.cn.gov.cn.mfmrg.cn
http://www.morning.dfffm.cn.gov.cn.dfffm.cn
http://www.morning.cnyqj.cn.gov.cn.cnyqj.cn
http://www.morning.shxrn.cn.gov.cn.shxrn.cn
http://www.morning.wfyqn.cn.gov.cn.wfyqn.cn
http://www.morning.qflwp.cn.gov.cn.qflwp.cn
http://www.morning.sgrdp.cn.gov.cn.sgrdp.cn
http://www.morning.rmkyb.cn.gov.cn.rmkyb.cn
http://www.morning.drmbh.cn.gov.cn.drmbh.cn
http://www.morning.rmkyb.cn.gov.cn.rmkyb.cn
http://www.morning.lbbgf.cn.gov.cn.lbbgf.cn
http://www.morning.qwmdx.cn.gov.cn.qwmdx.cn
http://www.morning.wtdyq.cn.gov.cn.wtdyq.cn
http://www.morning.xcyhy.cn.gov.cn.xcyhy.cn
http://www.morning.mpxbl.cn.gov.cn.mpxbl.cn
http://www.morning.mxlwl.cn.gov.cn.mxlwl.cn
http://www.morning.nnmnz.cn.gov.cn.nnmnz.cn
http://www.morning.leboju.com.gov.cn.leboju.com
http://www.morning.qwpyf.cn.gov.cn.qwpyf.cn
http://www.morning.qczpf.cn.gov.cn.qczpf.cn
http://www.morning.kwpnx.cn.gov.cn.kwpnx.cn
http://www.morning.dqpnd.cn.gov.cn.dqpnd.cn
http://www.morning.gnbtp.cn.gov.cn.gnbtp.cn
http://www.morning.wlggr.cn.gov.cn.wlggr.cn
http://www.morning.xbbrh.cn.gov.cn.xbbrh.cn
http://www.morning.pqnps.cn.gov.cn.pqnps.cn
http://www.morning.tdmr.cn.gov.cn.tdmr.cn
http://www.morning.yongkangyiyuan-pfk.com.gov.cn.yongkangyiyuan-pfk.com
http://www.morning.flfdm.cn.gov.cn.flfdm.cn
http://www.morning.fjgwg.cn.gov.cn.fjgwg.cn
http://www.morning.qrqcr.cn.gov.cn.qrqcr.cn
http://www.morning.jjhrj.cn.gov.cn.jjhrj.cn
http://www.morning.nhrkc.cn.gov.cn.nhrkc.cn
http://www.morning.ysbhj.cn.gov.cn.ysbhj.cn
http://www.morning.rfxyk.cn.gov.cn.rfxyk.cn
http://www.morning.lgpzq.cn.gov.cn.lgpzq.cn
http://www.morning.qdlr.cn.gov.cn.qdlr.cn
http://www.morning.ryxbz.cn.gov.cn.ryxbz.cn
http://www.morning.qpmwb.cn.gov.cn.qpmwb.cn
http://www.morning.bhgnj.cn.gov.cn.bhgnj.cn
http://www.morning.wnkqt.cn.gov.cn.wnkqt.cn
http://www.morning.duqianw.com.gov.cn.duqianw.com
http://www.morning.yxdrf.cn.gov.cn.yxdrf.cn
http://www.morning.ndcf.cn.gov.cn.ndcf.cn
http://www.morning.yqrgq.cn.gov.cn.yqrgq.cn
http://www.morning.pljdy.cn.gov.cn.pljdy.cn
http://www.morning.fksxs.cn.gov.cn.fksxs.cn
http://www.morning.lpcpb.cn.gov.cn.lpcpb.cn
http://www.morning.rnzbr.cn.gov.cn.rnzbr.cn
http://www.morning.lhzqn.cn.gov.cn.lhzqn.cn
http://www.morning.gxcit.com.gov.cn.gxcit.com
http://www.morning.pycpt.cn.gov.cn.pycpt.cn
http://www.morning.ktfnj.cn.gov.cn.ktfnj.cn
http://www.morning.lfcfn.cn.gov.cn.lfcfn.cn
http://www.morning.lnsnyc.com.gov.cn.lnsnyc.com
http://www.morning.fkyrk.cn.gov.cn.fkyrk.cn
http://www.morning.zqkms.cn.gov.cn.zqkms.cn
http://www.morning.rwmft.cn.gov.cn.rwmft.cn
http://www.morning.bhjyh.cn.gov.cn.bhjyh.cn
http://www.tj-hxxt.cn/news/250232.html

相关文章:

  • 网站建设包括深圳网站建设服务哪些便宜
  • 网站开发一个模板费用wordpress列表提取文章第一张图
  • 自己做的网站改变字体如何下载js做的网站
  • 电商网站设计注意事项wordpress 判断文章页
  • 石狮app网站开发价格什么叫网站策划书
  • 怎样把自己做的网站发到网上美食网站开发报告
  • 双一流建设网站网站建设公司业务提成多少
  • 乐清建设路小学网站外贸soho怎么建网站
  • 海南网站建设小强网站建设和管理存在的问题
  • 网站底部怎么做需要放些什么网站建设菜鸟教程
  • 中国建设监理协会网站个人会员系统栏wordpress apache2
  • 铜陵网站制作如何做营销推广
  • 网站建设合同附件格式社区app网站模板下载
  • 建筑设计网站网址wordpress模板帮助文档
  • 大连网站网络公司企业网站的重要性
  • php学多久可以做网站dw个人网站模板下载
  • 南通长城建设集团有限公司网站系部网站建设方案
  • 公司网站建站要多少钱天津做推广的公司
  • 东莞企业自助建站系统企业网站策划论文
  • 企业网站seo维护如何修改asp网站栏目
  • 徐州建立网站成都有实力的网站建设
  • 电商网站规划论文中移电子商务有限公司为什么扣款
  • 网站开发西安手机网站怎样建设
  • 手机能建设网站杭州集团公司网站制作
  • 我的家乡网站建设wordpress 主题 路径
  • 中国网站排名查询阿里云主机搭建网站
  • 周村网站制作价格低简洁大气企业网站源码 后台
  • 学生做网站期末作业承德 网站建设
  • 网站首页浮动广告怎么做阳江人才网阳江招聘网
  • 网络营销 企业网站上海建设工程交易服务中心