How to set the maximum to 10? Java

The code I have right now is

public void setLimit()
{
if (click>= max)
}

I’m not sure how to continue it or have another type of code to set the limit.

Respuesta :

public int setLimit(parameter) {
if (parameter > 10) {
return 10;
} else {
return parameter;
}
}