- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
个人说明大全,java
个人说明大全,java 篇一:java常用语句大全 1. 2. (根据老师讲得内容,自己总结的) Random r=new Random(); int i=r.nextInt(); 产生 随机数 3. Scanner in = new Scanner(System.in);int n = in.nextInt(); 控 制台输入 4. System.out.println(Integer.toBinaryString(-12)); 二进 制转换 32位 5. System.out.println(Long.toBinaryString(12)); 二进 制转换 64位 6. System.out.println(Integer.toHexString(46)); 十六 进制转换 7. 8. Math.sqrt 开根号 条件? 条件成立:条件不成立 三目运 算 9. switch(score/10){case 10:case 9:level=quot;优秀 quot;;break; switch.case 语句演示 10. 循环条件(布尔表达式){循环体} while 循环 11. 12. while(true) 和 for(;;) 等价 for(;;) do{ 循环体1} while(循环条件2) 1--2--true--1--2--false--结 束 do..while 13. int[]ary4={4,5,6}; int[]ary=new int[]{4,5,6}; 数组的 三种写法 14. 15.int[] ary=new int[length]System.out.println(Arrays.equals(arr1, arr2)); //布尔类型 数 组比较 16. 17. 18. Arrays.sort(balls);数组排序 //(原数组,原数组位置,目标数组,目标数组位置,个数) System.arraycopy(ary1, 0, ary4, 0, ary1.length); 数组 复制 19. balls=Arrays.copyOf(balls,balls.length+1); 复制数 组 20. 21. 22. 23. 24. Cell[] cells = new Cell[] { new Cell(0, 4), new Cell(0, 3), new Cell(0, 5), new Cell(1, 4), }; 二维数组 Cell[][]wall=new Cell[20][10];Timer timer=new Timer();, timer.schedule(new MyTask(), 0,1000);//1000ms=1s 定时器 25. 26. 被执行的任务 第一次执行延时时间 时间间隔 System.out.println(quot;同一个对象:quot; + (p1 == p2));比 较是否同一个对象 27. System.out.println(quot;内容一样:quot; + (p1.equals(p2))); 比较内容是否一样 28. String lower=str.toLowerCase();将字符串 转换为小写 29. String upper=str.toUpperCase();将字符串 转换为大写 30. String trim=str.trim(); 去掉字符串两 边空白 31. boolean starts=str.startsWith(quot;Helquot;);boolean类 型是以Hel开头 32. boolean ends = str.trim().endsWith(quot;orldquot;);去掉空 白,orld结尾 33. int index = str.indexOf(quot;inquot;); 获取字符位 置 34. index = str.indexOf(quot;inquot;,5);从str第6个字符开始 检索第一次出现in的位置 35. int last = str.lastIndexOf(quot;inquot;);从str中检索最 后一次出现in的位置 36. char chr = str.charAt(5); 获取字符串 中指定位置的字符 37. String[] array=str.split(quot;\\squot;); 以空格进行 拆分数组 38. int a=Integer.parseInt(array[0]); 将拆分的 字符串转换为数字 39. byte[] d
文档评论(0)