JAVA
패키지 컴파일러
사라링
2012. 5. 15. 18:37
- 패키지 컴파일 방법
- cmd> java -classpath classes;. com.example.model.BeerExpert
- -classpath classes;. --> 뒤에 나올 클래스의 위치
- com.example.model 은 classpath을 루트로 했을때 순서대로 있어야할 디렉토리(패키지는 디렉토리임)
Collection Class Sorting
-
public class Pnode {
private int start;
private int end;
private int max_vd_idx;
private double max_vd_value;
static public class PnodeComparator implements Comparator<Pnode>{
public int compare(Pnode o1, Pnode o2) {
return o1.start - o2.start;
}
}static void Main(String args[]){
-
/* split_queue : list of pnodes */
-
Collections.sort(split_queue, new Pnode.PnodeComparator());
-
}
}
이 글은 스프링노트에서 작성되었습니다.