Oh, so to make the swap method work I would have to create public variable which is bad design practice?
Type: Posts; User: simpson_121919
Oh, so to make the swap method work I would have to create public variable which is bad design practice?
in my instance field I have variables a = 1 and b = 2. I can not seem to pass "a" and "b" through my swap method as a parameter. I am confused to why.
public void swap(int i1, int i2)
...