Is it at all possible to check if a String variable has changed since any two iterations of a while loop?
while (true) {
String player=json_obj.getString("username");
System.out.println("Found Player "+player);
}
My reasoning for this is that a I don't want to keep printing out the player variable if it hasn't changed between each iteration of the while loop.
EDIT* Not sure why my post would receive a down vote since this is a valid question. *
Strings are immutable in Java, so you can't change it other than changing the object memory allocation segment that it points to.