I have the following lines of code in my main()
function:
The method Open()
returns the value of a boolean variable open
in the barber class. The run method in the barber class sets open
variable to true but the while loop in the main function doesn't stop. It's like it's seeing barber.Open()
as false forever, despite the change.
This is the relative code in the barber class :