To find out if you have installed Java, try:
Those commands try to locate (you could try "locate" instead of "whereis" too) the java interpreter.
If Java is installed, the whereis command should print out something like
"/usr/bin/java"
If the whereis command can't locate the java interpreter, either $PATH is wrong or you don't have java installed.
You could also do:
since that's where java gets installed by default, I believe.