[Solved] Why am I getting an error in my Java code? [closed]


The way i see it you have the following two issues with your posted code:

  1. There is no import for Toy class in your code. Add that import statement so that java knows what to do with it.
  2. Also there are two extra closing curly braces in the end.

solved Why am I getting an error in my Java code? [closed]