How do you check if you have java?

If you have windows, type in in the search box 'cmd' without the '. Then type in java - version if nothing appears you need to install it from java.org