How to skip a method or a code block in TestNG?

How to skip a method or a code block in TestNG?

To do such, we need to set the “enabled” parameter in test annotation to false. Initially, the value is set to value, by default.