public static ArrayList<ArrayList<Integer>> sum4num(int[] num,int target){
		ArrayList<ArrayList<Integer>> lists = new ArrayList<ArrayList<Integer>>();	
		HashMap<ArrayList<Integer>,Integer> hs = new HashMap<ArrayList<Integer>,Integer>();
		if (num.length<4) return lists;
		Arrays.sort(num);
		for (int j = 0;j<num.length-1;j++){
		for (int i = j+1;i<num.length-2;i++){			
		int sum = target-num[i]-num[j];
		int temp = sum;
		int front = i+1;
		int rear = num.length-1;
		ArrayList<Integer> list = new ArrayList<Integer>();
			while (front != rear){
				temp = sum- num[front]- num[rear];
				if (temp == 0){
					list.add(num[j]);
					list.add(num[i]);
					list.add(num[front]);
					list.add(num[rear]);			
					if (!hs.containsKey(list)){
						lists.add(list);
						hs.put(list, null);					
					}
					list = new ArrayList<Integer>();
					front++;
				}
				else if (temp < 0){
					rear--;
				}
				else if (temp > 0){
					front++;
				}
			}		
			}
		}
		return lists;
	}