Question: Why is this wrong? Compile Undo Cut Copy Paste Find Close public class DollApp { public static void main(String[]args) { Scanner in = new Scanner(System.in);

 Why is this wrong? Compile Undo Cut Copy Paste Find Close
Why is this wrong?

Compile Undo Cut Copy Paste Find Close public class DollApp { public static void main(String[]args) { Scanner in = new Scanner(System.in); System.out.println cannot find symbol Doll doll1 = new Doll: class Scanner doll1.pressMe(); doll1.setName("Rita"); doll1.pressMe : System.out.print("Would you like to set name?Y/N:> "); char choice = in.next().charAt(0); in.nextLine(): if((choice =='Y'11(choice =='y')){ System.out.print("Enter the name: "); String name=in.nextLine(); doll1.setName(name): } dolli.pressMe(); Class has to be compiled to set breakpoints

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!