Java I have a lending library that is not displaying theappropriate error message in the right spot. After making aselection to Mark the Item on loan, the existing code still promptsthe user for who you are loaning it to and the date it is beingloaned and then gives the error message. It needs to give it belowentering the incorrect title. In other words, the title doesn’texist in the library.
I have a media item class where the boolean lives, I have theLibrary code and the main project code below.
Media Item Class
public class MediaItem {
String title;
String format;
boolean onLoan;
String loanedTo;
String dateLoaned;
MediaItem(){ //default constructor
title
PayPal Gateway not configured
PayPal Gateway not configured