摘要: 字符串取反 String string = "abc123"; // 方式一 StringBuffer sBuffer1 = new StringBuffer(string); String string1 = sBuffer1.reverse().toString(); System.out.pr 阅读全文
posted @ 2017-03-29 17:05 SunnyCC 阅读(521) 评论(0) 推荐(0)
摘要: 1.找出最大值、最小值 int[] nums = { 23, 12, 15, 99 }; int a = nums[0]; int index = 0; for (int i = 1; i < nums.length; i++) { // if(a>nums[i]){ //最小值 if (a < n 阅读全文
posted @ 2017-03-29 13:39 SunnyCC 阅读(503) 评论(0) 推荐(0)