Thats what the Setters are for.
Type: Posts; User: Cornix
Thats what the Setters are for.
If you write:
private Rectangle(int width, int length) {
...
}
Then the constructor has been declared "private" and can not be used by any other classes other then the Rectangle class.
You can...
Your code is missing closing curly brackets. Whenever you open them you also have to close them later on.
Besides that the error message is pretty much self-explanatory, is it not?
We would just be repeating what all the other tutorials and textbooks say because the errors you make are so basic there is not much more to say about them. I dont feel like repeating textbooks.
You should really go over the basics once again before trying this program, there are countless errors in the program. Starting with misplaced semicolon and variables that have no type defined. You...
Setters and Getters are created for private member variables. You could google them to read more information on how these methods usually look like. A simple example would be:
public class Coord {...