There are some questions and its answers with output are in the pdf. Also, .java files are uploaded for your reference