• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I need some java help.....

GoingUp

Lifer
public Object removeCurrent() throws NoCurrentException {
DoubleNode temp;

if ( size <= 0 ){
throw new NoCurrentException();
}
temp=current;
else if (size == 1){
current = null;
head = null;
tail = null;
}//End of else if statement

else if (size > 1 && current.equals(head)) {
current.next.prev=current.prev;
current.prev.next=current.next;
current = current.next;
}//end of else if statement


else if (size > 1 && current.equals(tail)) {
current.next.prev=current.prev;
current.prev.next=current.next;
current = current.prev;
}//end of elseif statement
size--;
return temp;
}//end of removeCurrent method


At the bold part, I keep getting a compile error that I have an else, without an if..... where is my syntax wrong?
 
you have this line before the else:
temp=current;


btw, this should go in the Software - Application, Programing...
 
Back
Top