Yes of course. Modding can help improve your knowledge about java.
There are many ways to learn Java, by books, youtube tutorials, websites or here at SoloLearn. I would recommend checking out a channel on youtube called Thenewboston and he has many programming videos including Java for beginners playlist then intermediate playlist and even a game development playlist. So go ahead and learn Java.
It is certainly a good language to learn.