I mentioned this in another thread since Java does this anyway it would make sense. From what I recall Java doesn't automatically 0 or "" variables either and there must be some code already setting the variables to a default of 0 or empty string, so us later setting a default means the Java code most likely sets it twice.
I mentioned this in another thread since Java does this anyway it would make sense. From what I recall Java doesn't automatically 0 or "" variables either and there must be some code already setting the variables to a default of 0 or empty string, so us later setting a default means the Java code most likely sets it twice.
I'm not so sure that B4A or apps made with it set variables to 0 or "" by default, at least not on all Android builds. Reason being, I had recently added a new option to my app and later found that on at least one AVD, the variable defaulted to null, which caused an error when that value was saved to a json config file then later loaded in. The fix was to manually set it to 0 myself through code.