Is there any example code for creating a .java file?

I want to create a .java file in a user specified package. Is there any
example code for doing this in a plugin?

Thanks,

Please sign in to leave a comment.