You are using old Java code! In terms of some scenarios such as short code, Kotlin might win, but Java is robust and mature. If you want to learn programming concepts, Java will win.
Kotlin was designed to write a small amount of code in a shorter time compared to Java, so it has pros and cons, and it depends on many factors as there is no perfect programming language. I highly recommend you to check my Article.
https://medium.com/@ilyasioo/java-the-language-that-will-never-die-5767bf9cb94f







