java£ºÊÖдMyArrayLisyµÄ³£Ó÷½·¨£¬Ôöɾ¸Ä²é
package arrays.myArray;
public class MyArrayList {
private Object[] arrObj = new Object[3];
private int size = 0;
// ³¤¶È
public int size() {
return size;
}
// insert
public void add(Object obj) {
add(size,obj);
}
// update
// °ÑÇ°ÃæµÄÍùºóÒƶ¯
public void add(int index, Object obj) {
if(size==arrObj.length){
Object[] temp=new Object[size*2];
for(int i=0;i<arrObj.length;i++){
temp[i]=arrObj[i];
}
arrObj=temp;
}
//´ÓÇ°Íùºó
for (int i =size; i>index ; i--) {
arrObj[i] = arrObj[i-1];
}
arrObj[index]=obj;
size++;
}
// delete
// °ÑºóÃæµÄÍùÇ°Òƶ¯
public void remove(int index) {
size--;
for (int i =index;i<size; i++) {
arrObj[i] = arrObj[i+1];
}
}
public Object get(int index) {
return arrObj[index];
}
}
Ïà¹ØÎĵµ£º
ÉùÃ÷×Ö¶ÎÓ³Éä
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FiledRef
{
String fieldName();
}
ÉùÃ÷±íÓ³Éä
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TableRef
{
& ......
¡¡¡¡1 MySQL´æ´¢´óÈÝÁ¿µÄ¶þ½øÖÆÎļþµÄ¸ñʽÊÇblob£¬Æäʵ³ýÁËͼƬ»¹¿ÉÒÔ´æ±ðµÄ
¡¡¡¡2 ÒªÏòÊý¾Ý¿â´æ´¢¶þ½øÖƵÄÎļþÒ»¶¨Òª°ÑÒª´æ´¢µÄÊý¾Ýת»»³É¶þ½øÖÆÁ÷
¡¡¡¡·Ï»°¾Í²»¶à˵ÁË£¬´ó¼Ò¿´¿´´úÂëºÜÈÝÒ×Ã÷°×£¬ÏÈÀ´¿´Ò»¸öapp³ÌÐò£¬µ±È»Ê×ÏÈÄúÒªÔÚÊý¾Ý¿âÖÐÏȽ¨Á¢Ò»¸öÓÃÓÚ±£´æͼƬµÄ±íºÍÏàÓ¦µÄÁУ¬Êý¾Ý¸ñʽΪblob
¡¡¡¡ package ......
Ò»£ºÒª½â¾öµÄÎÊÌâ
ÎÒÃÇÔÚ³¢ÏÊ JDK1.5 µÄʱºò£¬ÏàÐŲ»ÉÙÈËÓöµ½¹ý Unsupported major.minor version 49.0
´íÎ󣬵±Ê±¶¨»áãȻ²»ÖªËù´ë¡£ÒòΪ¸Õ¿ªÊ¼ÄÇ»á¶ù£¬ÍøÉÏÓë´ËÏà¹ØµÄÖÐÎÄ×ÊÁÏ»¹²»¶à£¬ÏÖÔÚºÃÁË£¬ÍøÉÏÒ»ÕÒ¾ÍÖªµÀÊÇÈçºÎ½â¾ö£¬´ó¶à»á¸æËßÄãҪʹÓà JDK
1.4 ÖØбàÒë¡£ÄÇôÖÁÓÚΪʲô£ ......
package arrays.compara;
/**
*
* @author Happy ¶þ·Ö²éÕÒ·¨
*/
public class BinarySearch {
public static void main(String[] args) {
int[] arrInt = { 2, 34, 32, 24, 23, 34, 12, 3, 4, 2 };
int index = bSearch(29, arrInt, 0, arrInt.length);
& ......
package arrays.file;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamRea ......