Can some one explain what I am doing wrong with my code. please see… Can some one explain what I am doing wrong with my code. please see p

Can some one explain what I am doing wrong with my code. please see… Can some one explain what I am doing wrong with my code. please see photo for my code JavaMany documents use a specific format for a person’s name. Wright a program whose input is: firstName middleName lastName, and whose output is: lastName, firstName middleInitial.Ex: If the input is:Pat Silly Doethe output is:Doe, Pat S.If the input has the form firstName lastName, the output is lastName, firstName.Ex: If the input is:Julia Clarkthe output is:Clark, JuliaImage transcription textAB ACTIVITY 3.24.1: LAB: Name format6 / 10 LabProgram.java Load defaulttemplate… import java. util…. Show more… Show moreImage transcription textDevelop mode Submit mode Run yourprogram as often as you’d like, beforesubmitting for grading. Be… Show more… Show more  Computer Science Engineering & Technology Java Programming PRG 420 Share QuestionEmailCopy link