IntelliJ insert blank line before last '}' in class files
This is not possible with stock IntelliJ. If you open up Preferences > Editor > Code Style > Java and then click the Blank Lines Tab. you can see a list of options.
As you can see, there is an option for Maximum Blank Lines Before '}' but unfortunately not for Minimum Blank Lines.
UPDATE:
"Before class end" option was added to "Minimum Blank Lines".
Available since 2018.2 - Youtrack Ticket
Settings > Editor > Code Style > Java -> Blank Lines Tab
Before class end: 1