I have been trying to solve the issue with my code for a decent amount of time now and i can't as i'm still fairly new to this. The issue is that the while loop seems to be skipped and no matter the inputs for nights or bookingName the error message won't show and it skips to the next prompt or the receipt.
#I need some help with my code
16 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @unborn rose! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Give a sample of inputs and outputs
The code looks correct to me
yeah
i do have this other code that does work as intended:
but the task requires the booking class
The issue is with your input class. Perhaps create a new .java file with the same code and see if that runs