When you install netbeans, in one of the steps, it asks you to give JDK home path. It takes default path at the time where JDK is supposed to be. In that step, click on browse and give proper path to where you've installed JDK.
First of all you uninstall the java 11
Then there are two options..
Either you install the older one version ie. 8.0 then install net beans..
OR you can simply download the combined package of both.