java - Type erasure interferes with polymorphism -
i reading core java volume , encounter question in translating generic expression. here book said.
i don't understand why there interfere. highlighted sentence, why setsecond(object) method called? shouldn't setsecond(date) method since interval dateinterval object?
the main problem, think, comes between brackets (in case ) exists when you're writing code. it's compilation-time checking. that's type erasure about. when compile code, have references object , these bridge methods in bytecodes.