| Author |
solved: Customer exercise
|
Igor Mechnikov
Ranch Hand
Joined: Feb 13, 2011
Posts: 100
|
|
I hope it is ok to post this here:
Edit: I think the problem lies in that the file is called Customer as well as one of its classes.
Edit2: and so it is, changing public class Customer to public class Main works
The error is:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
isMale cannot be resolved or is not a field
isGood cannot be resolved or is not a field
name cannot be resolved or is not a field
isMale cannot be resolved or is not a field
isGood cannot be resolved or is not a field
name cannot be resolved or is not a field
at Customer.main(Customer.java:25)
|
String knock = "\u042F \u0418\u0433\u043e\u0440\u044c";
|
 |
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
You have defined Customer twice as the error below indicates :
john and nicloe are instances of the outer customer class and not the inner customer.
I changed the "main" class name to GreetCustomer and got this output :
PS : thank you.
|
SCJP 6. Learning more now.
|
 |
 |
|
|
subject: solved: Customer exercise
|
|
|