-1
public void sort(){
Node sortedList = null;
while(sortedList != null){
Node current = sortedList;
sortedList = sortedList.next;
Node x;
Node previous = null;
for(x = sortedList; x != null; x = x.next){
if(current.value < x.value){
break;
}
previous = x;
}
if(previous == null){
current.next = sortedList;
sortedList = current;
}
else{
current.next = previous.next;
previous.next = current;
}
return sortedList;
}}}
これはエラーメッセージです:Javaで「エラー:シンボルを見つけることができません」を解決するには?
LinkedList.java:352: error: cannot find symbol
if(current.value < x.value){
^
symbol: variable value
location: variable current of type `LinkedList.Node`
このエラーメッセージLinkedList.java:352である:それはタイプLinkedList.Node – user6157611
の可変電流:エラー:場合記号 を見つけることができません(current.value
Stultuske
私たちに 'Node'の定義を教えてください –