1. First download Netbeans from here: Download Netbeans
2. Then you have to give the permission to access the downloaded file. To give permission and install, type the following code
chmod +x ~/Downloads/netbeans-8.0.2-linux.sh
./netbeans-8.0.2-linux.sh