Length attribute permits the size of the column used to map a value particularly for a string value. Persistence package, so we import this package as the first step. By default, the id annotation will automatically determine the most appropriate primary key generation strategy to be used but you can override this by mwat the generatedvalue mext, which takes two parameters strategy and generator that i'm not going to discuss here, so let us use only the default key generation strategy. Finally, we will create our application class with the main() method to run the application. Java source file as shown above and compile it.Having bought a subscription, you can download this or other directories on our website. To download the file, click on the button below.