常用算法

请最大值:

 int max(int a,int b){
    return (a>b)?a:b;
}

byte 型数组的相加组合。

 	 byte [] a={1,2,3,4,5};
    	 byte[] b={7,8,9};
    	 byte [] c={10,12};
    	 byte d[]=new byte [a.length+b.length+c.length];
		 System.out.println(d.length);
		 System.arraycopy(a, 0, d, 0, a.length);
		 System.arraycopy(b, 0, d,a.length, b.length);
		 System.arraycopy(c, 0, d, a.length+b.length, c.length);
		 
		 for(byte i:d){
			 System.out.print(i);
		 }



原文地址:https://www.cnblogs.com/java20130726/p/3218325.html