Hi Kim,
you have to write your code within //BEGIN USER CODE and //END CODE
area in your java file
if you have some class or function that you want to create then you can between
//BEGIN EXTRA CODE and //END EXTRA CODE
all code written outside of this will be overwritten when you run your app