AnchorPane.getBottomAnchor()
is a static method. Static methods are associated with a class, not an instance, and should therefore be called by their class name, not through a reference. The reason is to avoid confusion about which method is finally called, since static methods can not be overridden. See also https://stackoverflow.com/a/2629846/1611055 for some good additional information.
Try
System.out.println(heightProperty().doubleValue()+" "+AnchorPane.getBottomAnchor(p));