The postion of that line of code should not cause any problems.
All three lines reference the method's argument and are not related.
Type: Posts; User: Norm
The postion of that line of code should not cause any problems.
All three lines reference the method's argument and are not related.
You write it because the compiler wants one defined. See the error message.
Are you asking how to write the code to define a constructor to the Art class?
See the tutorial:
Providing Constructors for Your Classes (The Java™ Tutorials > Learning the Java Language >...
The first code you posted is not a constructor.
Try adding the constructor to the Art class.
I can not see it. Can you copy and paste here the code you are talking about?
Read this about how to create a class and use constructors:
Providing Constructors for Your Classes (The Java™...
I dont see that You have not posted the new code with the new Art class constructor.
Post the code om line 15 and the error message for it.
Did you try adding a constructor to the Art class that "throws" an exception as the error message suggested?
Did you try adding a constructor to the Art class that "throws" an exception as the error message suggested?
Edit your post and wrap your code with
<YOUR CODE HERE> to get
highlighting
The error message says:
Can you compile the code with a compiler that generates compile time messages? Try using...
Can't guess until you post the error message and the code.
Please post the full text of the error message and the lines of code that cause it.