자바 링크리스트의 검색 방법의 삼항 연산자가 있기 때문에, 당신은 삼항 조건 연산자와 그 논리를 표현할 수내가 여기</p> <p><code>temp = temp.next</code>에 <code>Syntax error on token "=", != expected</code>있어
static boolean search(int xData) {
Node temp = head;
while (temp != null) {
return (temp.data == xData) ? true : temp = temp.next;
}
return false;
}