java Êý×é²Ù×÷£¬´ÓÊý×éaÖÐɾ³ýÊý×ébÖдæÔÚµÄÔªËØ
//´ÓÊý×éaÖÐɾ³ýÊý×ébÖдæÔÚµÄÔªËØ
String stra[] = {"g","b","c","h","k"};//ÔʼÊý×é
String strb[] = {"g","k"}; //ÒƳýµÄÔªËØ
ArrayList list = new ArrayList();
//·½·¨Ò»
for(int i=0;i<stra.length;i++){
int n=0;
for(int j=0;j<strb.length;j++){
if(stra[i].equals(strb[j])){
n++;
}
}
if(n==0){
list.add(stra[i]);
}
}
// //·½·¨¶þ
// for(int j=0;j<stra.length;j++){
// if(java.util.Arrays.binarySearch(strb, stra[j])<0){
// list.add(stra[j]);
// }
// }
//µÃµ½ÐµÄÊý×éc
Object[] strc = (Object[])list.toArray();
Ïà¹ØÎĵµ£º
ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔÀí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËغ͸ÃÔªËصĽڵ㡣
public class NodeBean implements Serializable
{
private Object data; //ÔªËر¾Éí
private NodeBean next; //ÏÂÒ»¸ö½Úµã
&n ......
ʹÓÃjava.lang.MathÀ࣬Éú³É500¸ö0~99µÄËæ»úÊý£¬½øÐÐÅÅÐòÊä³ö£¬²¢Çó×î´óÖµ¡¢×îСֵ¡¢Æ½¾ùÖµ¡¢±ê×¼²î¡¢·½²î¡¢¾ù·½²î£»
import java.lang.Math;
import java.util.Arrays;
public class Main {
public static void main(String args[]) {
//create random
int [] data =new int[500];
double sum = 0, avg =0; ......
Èç¹ûÄãjavaÒѾÈëÃÅÁË£¬½¨ÒéÄãÏȲ»È¥Ïë´úÂë¡£¶øÊÇÈ¥ÏëÍê³ÉÈÎÎñÒª×öµÄ²½Öè¡£ÏëºÃÁ˺óÄÄÅÂÄãÈ¥Õ³Ìù´úÂ붼¿ÉÒÔ¡£±à³ÌÊÇ¿¼ÑéµÄ˼ά£¬²»ÊÇд´úÂëµÄËٶȣ¬ºÍ¶Ô´úÂëµÄ¼ÇÒäÐÔ¡£
±à³ÌÊÇÒ»¼þ¾Ñé»î, ²»ÊÇ¿´ÊéÄܽâ¾öµÄ, ±à³ÌÖÐÓöµ½µÄÎÊÌâǧÆæ°Ù¹Ö, ¸ù±¾²»ÊÇÒ»±¾Êé»òÕßn±¾ÄܸøÄã½â¾öµÄ£¬±ØÐë×Ô¼ºÇ××ÔÈ¥Ìå»á
ËùÒÔ, ÕÒ±¾ÓÐʵÀýµ ......
1£¬intÓëbytes ת»»
intת»»³Ébytes
public
static
final
byte
[]
int2bytes
(
int
value
)
{
return
new
byte
[]
{
(
byte
)(
value
>>>
24
),
(
byte
)(
value
>>>
16
),
......
·µ»Ø¶à¸ö¶ÔÏó£º
PROCEDURE AUTO_SEL_INVOICE_DETAIL(
P_RESULT_LIST OUT SYS_REFCURSOR) AS
BEGIN
OPEN P_RESULT_LIST FOR
SELECT DISTINCT CC.CHARGE_COLLECTION_ID CHARGE_COLLECTION_ID, CC.COLLECT_DATE COLLECT_DATE, C ......