Question: class CustomerTest { public static void main ( String [ ] args ) { Customer c 1 = new Customer ( user ,
class CustomerTest
public static void mainString args
Customer c new Customeruser"pass";
c setUserNameJava;
outputName;
public static void outputNameCustomer cust
System. out.printlnName: cust.getUserName;
The instance is not in scope in the method outputName
The instance needs to be declared in outputName
The should be returned as a return value from outputName
The should be declared at the class level to be accessed in the outputName method.
The should be passed into the outputName method as a parameter.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
