Java System.out call printing twice
I put off asking this as it must be something daft and, given it was also me who asked this, I hesitated and have spent the last few hours getting increasingly frustrated:
http://stackoverflow.com/questions/8639122/last-line-of-for-loop-executed-twice

I think it might be a similar sort of oversight. 

I also found this, which deals with a similar problem:
http://stackoverflow.com/questions/1186148/java-exception-printing-twice

but still can't seem to fix mine. 

Here is a snippet from one class:
    
    switch (Integer.parseInt(oc, 16)) 
    {
      case 0x0F:
      ccrFlagState.zBit(true);
      break;
    }

Which calls this snippet in another:
    
    public boolean zBit(boolean set) {

		if (set = true) {
			System.out.println("Z set in CCR class");
		}
		return set;
	}

When I input "0F" the console prints "Z set in CCR class" twice.

Can anyone point me in the right direction as to why? Thanks, Robert.
Java System.out call printing twice
===

I put off asking this as it must be something daft and, given it was also me who asked this, I hesitated and have spent the last few hours getting increasingly frustrated:
http://stackoverflow.com/questions/8639122/last-line-of-for-loop-executed-twice

I think it might be a similar sort of oversight. 

I also found this, which deals with a similar problem:
http://stackoverflow.com/questions/1186148/java-exception-printing-twice

but still can't seem to fix mine. 

Here is a snippet from one class:
    
    switch (Integer.parseInt(oc, 16)) 
    {
      case 0x0F:
      ccrFlagState.zBit(true);
      break;
    }

Which calls this snippet in another:
    
    public boolean zBit(boolean set) {

		if (set = true) {
			System.out.println("Z set in CCR class");
		}
		return set;
	}

When I input "0F" the console prints "Z set in CCR class" twice.

Can anyone point me in the right direction as to why? Thanks, Robert.