I have a custom object that has a single value of type int that I wanting to do processing on to keep this value in a set range. My question is this: Given the following cla
Foo myObject = new Foo();
Here, myObject holds the reference. You can't assign primitive value such as 0 to object references.
myObject
Instead, you should do myObject.setBar(10);
myObject.setBar(10);