You need to override the exact same method with the exact same method signature. That means: Same name, same return type, same scope (public, protected, private, none) and the same parameter types and number.
So your second method public NXTInfo[] search(String name, int protocol) throws NXTCommException
does not count as an override for public NXTInfo[] search(String name) throws NXTCommException
.
You might consider doing something like this:
@Override
public NXTInfo[] search(String name) throws NXTCommException {
return search(name, myDefaultProtocolInt);
}
public NXTInfo[] search(String name, int protocol) throws NXTCommException {
//stuff that would take up too much room
}