Modern databases allow stored procedures to be written in a variety of languages. One commonly implemented language is java.N.B., this…