How to disable adding experience when level reach max

Hi, I need Some Problem solve to my issue.
How can i disable adding experience when reach to level Max. So when the level is max i would not be able to add the experience
So if i input some button to add an experience, it works until level max.

int level = 0;
int maxLevel = 15;
int experience = 0;

if (level < maxLevel)

Thanks, but how can i set the max level? What is the code looks like?
Let me know