You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Question

If I have a data member initialized as:

protected double[] _refPoint = new double[3];

does this zero fill _refPoint or does it contain uninitialized memory?

Answer

Java classes are never allowed to have unreferenced memory. Arrays are always zero filled. (Thus code should always run reproducibly – unless you use random numbers or rely on some external data source).

  • No labels