im having set of points... i need to form a cluster of those points.... i will get another set of points ... and i have to check whether those set of points lies in that cluster or not. please help me how to cluster points i have....

thanks in advance

Your question is not clear;

I think you are looking for something like "set"

// Create the set
Set set = new HashSet();
// Add elements to the set


// Determining if an element is in the set
boolean b = set.contains("a"); // true
b = set.contains("d"); // false

Can you define what a cluster is?
Do the points enclose a shape such that a line connecting the outer most points forms a boundary for a region?

i nead code for k-means or hierarchical clustering of points.... and ..... is any one know abt how to find the distance between two clusters

Sorry, I thought you wanted help designing and writing this program.
If you want help, could you define "k-means or hierarchical clustering of points"?
Can you define what a cluster is?