I had to implement a Java REPL like this one in school.
My experience of using it is that tells me that without a undefined type keyword it becomes very boring to use. Each time you have to define a variable you have to write all type info:
Map<String,String> foo = new HashMap<>();
If java had a inferred type declaration, like Golang, Swift, Scala, etc. This would be much simpler: var foo = new HashMap<String,String>();
But from what I think there is nothing like that on Java's roadmap. In fact, I think it was proposed and rejected in the past.