I just ran which java command and got the output /usr/bin/java
I also executed java -version command and also got version information output. So I believe that there is an actual java executable and not just a placeholder kind of thing. I may have installed it at some point, but I cannot remember doing that. Or does it comes pre-installed with the macOS Mojave?
If it doesn't come pre-installed, how do I get rid of it?
Below is the output of
ls -l /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Sep 25 01:45 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java