이 클래스가 있는데, 함수 작업을 제거하는 방법을 이해할 수 없습니다. remove()
전에 클래스 이름 (Customer
)이되어야하는 이유는 무엇이며 무엇을 의미합니까? Customer customer = (Customer) customers.firstElement();
remove() 함수를 이해할 수 없습니다.
도와 주시겠습니까?
private java.util.Vector customers = new java.util.Vector();
Server server;
void insert(AbstractEvent customer){
customers.addElement(customer);
}
/**
* @return the first customer in the queue
*/
Customer remove() {
Customer customer = (Customer) customers.firstElement();
customers.removeElementAt(0);
return customer;
}
int size() {
return customers.size();
}
클래스 보인다. – Kayaman
@ 카야 만 사실! http://stackoverflow.com/questions/1386275/why-is-java-vector-class-considered-obsolete-or-deprecated – alfasin