Y
Hacker News
new
|
ask
|
show
|
jobs
by
vturner
1611 days ago
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.
1 comments
kaba0
1610 days 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.
link