private static void knnMethod() {
				// TODO Auto-generated method stub
				double distance=0;
				Neighbour [][] TestingData_KnnBuff_sorted = new Neighbour [TestingData2.length][K];	
				
				/* new today mon*/
				for(int t=0; t<TestingData2.length; t++){   
		        	for(int m=0; m<K; m++)	
		        	{	
		        		TestingData_KnnBuff_sorted[t][m]= new Neighbour();
		        	}
			   }  
				
				
						
				/* for each TestingData query, find K nearest neighbours in TrainingData*/
				for(int i=0; i<TestingData2.length; i++){
					
					Neighbour.setMaxDistance(1000); //reset max distance for each new cycle
		//			System.out.println("Record #:"+ i);
		
					for(int j=0; j<TrainingData2.length; j++){
						
						/* Get Distance */
						distance = EuclideanDistance(TrainingData2[j].getX(),TrainingData2[j].getY(),TrainingData2[j].getZ(), 
						          TestingData2[i].getX(), TestingData2[i].getY(), TestingData2[i].getZ());		
				
						
						/*import and sort Knearest neigbour with new distance  */
						if(distance < Neighbour.getMaxDistance()){ 
							TestingData_KnnBuff_sorted [i] = BubbleSort(distance, TrainingData2[j].getActivity(),TestingData_KnnBuff_sorted [i]); //store distance and activity of training data
							
						}
						
											
					} //end TrainingData loop

				
					
					/*classify Testingdata sample from sorted KNeighbours */
					String Classified_activity=null;
					Classified_activity= ClassifySample(TestingData_KnnBuff_sorted[i]); 
					System.out.println("Record #:"+ i + "\t"+ "Classified label:" +"\t" + Classified_activity );
			
				/*	System.out.println("~~~BubbleSort return array ~~~");
					for(int j=0; j<TestingData_KnnBuff_sorted[i].length; j++){
							System.out.println("distance: " + TestingData_KnnBuff_sorted[i][j].getDistance() + "\t" + "activity:"+ TestingData_KnnBuff_sorted[i][j].getActivity());
			      
					}
					*/		
					
				
//			/		System.out.println( "--------------------------------------------------\n");
									
				}//end TestingData loop
				
				
				
			}