Hi @ahmedsaid2019, welcome to the Glitch forum!
As @drew notes only the Node.js ecosystem is officially supported, but your Glitch project is just a container, so whatever you can run on a basic Linux install should work fine: javac HelloWorld.java
should do what you expect it to. Language support on Glitch: a list gives a few additional details more generally.