In Java there's no such thing as a "global" variable/method. Thus, for methods outside of your current class (including the inheritance hierarchy) you must quantify where that variable/method came from.
distancePostSquareRoot = Math.sqrt(distancePreSquareRoot); // sqrt is found inside the Math class as a static method
An alternative available starting in SE 5 is something known as "static imports". This lets you do things such as importing static methods/variables and using them without needing to quantify where they come from. Note that you should be careful when using static imports.
import static java.lang.Math.sqrt;
public class SomeClass
{
public static void main(String[] args)
{
double a = sqrt(5);
}
}