> Please suggest way to delete the file and I don't like apple controlling my Mac book so tightly
Short version: wipe your drive and install some other OS.
Apple have long marched down a part of locking down parts of the OS to prevent unauthorized change to parts of the file system.
In 99% of cases nobody notices
In 0.99% of the rest of the cases those changes prevent malware or malicious activity directed towards the system - at least to the point where it acts as a barrier to malware and users have to go out of their way (at least to authenticate and acknowledge the change) before changes can be made. That's helped maintain the perception of MacOS being a more secure OS than others.
The remaining 0.001% of cases are users like yourself who demand absolute control over their filesystem, no matter what the advantages or disadvantages may be. At the end of the day, Apple are not catering to the 0.001%, so if that's a hill you're prepared to die on, you'll need to find another platform to do it on.
Yes, you can do it - you can disable all the OS protections, file system security and whatnot, and install whatever binary you want in the place of /usr/bin/javac, but it will slow you down every time you need to switch Java versions - most people would follow the standard model of installing multiple Java versions that have existed for years and get on with the job of coding.