nullPointerException, guess when using getClass().getName()
问题 Reposting a question with more detail. The problem is a nullPointerException which occurs at clusterer.next(). Below is a simplified version of the program and am hoping you can notice where the issue is. public class Clustering { private DistanceMeasure measure; //Manhattan or Euclidean private ClusterMethod method; //SingleLinkage or CompleteLinkage private Clusterer clusterer; public static void main(String[] args) { new Clustering().start(); } Clustering() { measure = new Manhattan();