I isolated my original problem in this class. It is returning 2 2
. The first time I executed this code I got 1 1
, I'm going crazy, I don't understand this behavior
public class Test {
public static void main(String[] args) {
test("A");
}
public static void test(String cadena) {
System.out.println(cadena.length());
System.out.println("A".length());
}
}