Code java in script shell

Hello;

Is it possible to insert Java code in a shell script, if so how please?

Thank you