Java Scanner and While loop question
I try to prompt user to enter a postive number and if the user’sinput is negative, there should be a message saying enter apositive number. otherwise if user enters “quit” the loop shouldbreak.
So I use scanner method nextLine to read what’s user’s input andcast it into double if user enters number. However, I might’ve doneit wrong as I keep getting an error message. Also should I putanother while loop within the while loop? like what I’ve donebelow.


Library/Java/Javavirtua
PayPal Gateway not configured
PayPal Gateway not configured