Java implements pass by reference right?
So when I do cons("item", stack) with the following code I should print out --> itemabcd. But that isn't the case, why?
String stack = "abcd";
cons("item",stack);
System.out.println(stack);
//
public void cons(String item, String stack)
{
stack = item + stack;
}