There's no problem with returning two things. The method is void, so it returns nothing at all!
Understand that throughout this program you have two points. Just two. And that never changes.
...
Type: Posts; User: pbrockway2
There's no problem with returning two things. The method is void, so it returns nothing at all!
Understand that throughout this program you have two points. Just two. And that never changes.
...
Both PhHein and myself did address just this I think.
The question was given here as "An exercise in ch. 3 supplies some code to define two points, send them to a method that trades their (x,y)...
The x/y values of a Point are called the state of the point object.
As mentioned Java is pass by value. This has to do with variables and their values (not objects and their state). The bottom...