arvindsinghu is partly correct, I did gloss over some ancillary details. There are other supporting codes used in WP core, but they all revolve around the core PHP code. These cannot be substituted for PHP.
If we’re being pedantic, Java is not used at all in core WP code. Maybe he meant JavaScript, which is used in a supporting role, but is entirely unrelated to Java. CSS and XML are codes, but they are not programming languages. Some would argue that JavaScript and PHP are not true programming languages either, they are scripting languages. But now I’ve become too pedantic as well. Enough.
It is useful to know the supporting codes that arvindsinghu intended to mention, plus jQuery, SQL, and lets not forget HTML ?? There’s also JSON, underscore, LESS, and likely more that’s not coming to me at the moment. I took your question to mean is there an alternative to use in place of PHP. For that there is not.