Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
vturner
· 4y ago · 0 comments
JsonParser() is Scala syntax. Not sure how you'd accomplish that in Java and as for parse<Book> Java's generics are erased at compile time.
Comments
[–]
kaba0
4y ago
Parent just missed the new keyword, and generics can work based on return type as well with the above syntax. It has nothing to do with erasure, we are at compile time.