0
Java SE를 사용하여 연결된 목록이있는 전화 번호부 프로토 타입 프로젝트를 만들고 싶습니다. 이름, 성, 모바일, 집, 사무실 등의 데이터를 저장해야합니다.연결된 목록 검색
사실, 나는
public Node search(String key){
Node current=first;
while(current.data == null ? key != null : !current.data.equals(key))
if(current.next==null)
return null;
else
current=current.next;
return current;
}
왜지도를 사용하지 않으시겠습니까? –
힌트는 : 당신이 자바 멍청한 멍청한 쿵푸 – Bohemian
을 사용하지 않는 경우 LinkedList는 어디에 정의되어 있습니까? –