Question: why is my while loop not catching my Y string?? System.out.print(Hello! Welcome, would you like to create an account? Enter 'Y' or 'N': ); //choice

why is my while loop not catching my Y string??

why is my while loop not catching my Y string?? System.out.print("Hello! Welcome,

System.out.print("Hello! Welcome, would you like to create an account? Enter 'Y' or 'N': "); //choice to create a profile choice = input.nextLine(); while(choice=="y") { System.out.println("Enter your first name: "); String first = input.next(); System.out.println("Enter your last name: "); String last = input.next(); Name ProfileName = new Name(first, last)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!