How do I programatically exit my app?

I start to learn programming using Monkey C for my Epix. I created a template app with the picture of the monkey and 2 menu items "Item 1" and "Item 2"

Now I would like to add a third menu item "Exit" so that when I tap on it, the app will terminate and exit.

Which method I should call to terminate the app?

I tried the method System.exit() but it doesn't work.

Can someone shed me a light?

Thank you
Q