Author of:

Colli-Da-Scope. A functional solution to collision detection, tracking, and resolution which avoids the drawbacks of the Visitor Pattern.

Base Jumper. A simple Android app for jumping a binary, octal, decimal, or hexadecimal number to each of the other bases.

There ways you can guarantee an immediate down-vote from me:

  1. Claim that you "know" that Java is pass by reference.
  2. Claim that Java's control mechanisms are not working and your code looks like this:
    if(yourString == anotherString) {...}

These are fundamental understandings of the Java language. Great answers have been given to both. It shows you have not put in a reasonable amount of effort in learning nor finding a solution here first and thus are deserving of the negative reputation.

enter image description here