Can I use Java to make a book app.?

Can I use Java to make a book reading app?
Any code examples, advice or other resources for a beginner.?

Can you describe what you mean by a “book reading app”? Like, something to display epub documents?

I mean like how to create the epub document itself. From what I understand it involves XML and CSS.?
I would like to create a book where the user can get side notes and other usefull tips and info in certain sections if they like
So it might be helpful to know how to make my own reader as well