What method is used to measure the volume of an irregular solid?

One of the following:

1) Immerse it into a liquid; see how much liquid gets displaced.

2) Use integration.