'Java help needed storing the public and private keys in a local file (.txt)

I'm kinda new to thisand what I'm trying to do is store those private and public keys so that they don't regenerate every time i open the app if that's how it's supposed to be. Thank you to anyone who knows how to help. i don't where to put FileOutputStream to store and Files.readAllBytes to read



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source