자바에서
public Node {
int data;
Node link;
}
로 구현할때 a라는 연결리스트가 data랑 link모두 null이 아닐때 a=null을 쓰면 data는 남고 link만 null이 되는건가요? 아니면 a.data를 호출하면 에러가 발생하나요?