very wrong , even if catchy example. You are not talking about two sovereign countries , one of which attacked other like Japan USA or Russia Ukraine. It's occupier and population subjugated and virtually imprisoned, thus entitled to resistance by whatever means they found in their disposal.
not to mention technicalities - Gaza is to close to Tel Aviv and Jerusalem for reasonable nuclear bomb usage unless Israel would wish to make antisemites happy.