We can use assertion in the public method but we should not use assertion in the public method.
Why should not?
A public method is exposed to the world and you don't know who will be using your public method in future too. public methods play the role of interface to the outside world, you are supposed to impose constraint on the arguments, inside the method itself. There is not guarantee that Assertion will run. You don't want to check the arguments conditionally on behalf of whether Assertion is enabled or not.
We can walk to school together. And we can both read this tiny ad: