Focal length can be calculated by passing a small beam of parallel rays from a long distance through the lens, and then observing the location of the image formed. The image (real and inverted) is formed at the focus.
A small shining object may be kept at multiple distances and the image converged on the axis is captured on the screen. Then using the lens formula, the focal length can be calculated.
Same experiment can be repeated, whether the lens is in air or in water.