![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java好的思路
一只小小肥羊
这个作者很懒,什么都没留下…
展开
-
Java中交换两数的值
1.不借助临时变量的方法: public void swap(int x,inty) { x=x+y; y=x-y; x=x-y; } 2.借助临时变量的方法 public void swap(int x,inty) { int temp=x; x=y; y=temp; }转载 2018-10-19 16:04:04 · 235 阅读 · 0 评论 -
Java中数组复制的几种方法
阅读目录 1.for循环方法: 2.System.arraycopy()方法: 3.Arrays.copyOf()方法: 4.Object.clone()方法: /** * @author zhengbinMac */ public class Test { public static void main(String[] args) { int[] array...转载 2018-10-18 15:40:59 · 116 阅读 · 0 评论