Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Why is this wrong? Compre Undo Cut Copy Paste Find... Close import java.util.Scanner;//this import is required public class DollApp { public static void main(String[]args) {
Why is this wrong?
Compre Undo Cut Copy Paste Find... Close import java.util.Scanner;//this import is required public class DollApp { public static void main(String[]args) { Scanner in = new Scanner(System.in); System.out.println("Creating a doll.."); Doll doll1 = new Doll(); cannot find symbol - class Doll Prov 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') || (choice =='y')){ System.out.print("Enter the name: "); String name=in.nextLine(); doll1.setName (name) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started