Have something interesting to share with Java Eastern Europe community?
Become a speaker now
Alexander Matorin

Alexander Matorin

Sberbank-Technology, Russia

Delivery manager and Java developer at Sberbank-Technology. Currently developing risk platform and a system for fraud detection for finance markets. Conducts courses about Java and distributed system in Moscow University.

Speaker's activity
Tricky Java Generics
May 20th

Generics were added to the Java language more than 10 year ago. But do you really understand them?

We’ll discuss:

  • What is heap pollution?
  • How does the compiler translate generics?
  • Why it’s not allowed to create parametrized array (List<String>[])
  • What are bridge methods, can we reach them?
  • Type erasure rules
  • Difference between List, List<Object>, List<?>
  • Why it’s not allowed to add Integer to List<? extends Number>
  • Why it’s not allowed to parameterize exception classes?
  • What’s wrong with Collections.max signature: <T extends Object & Comparabl<? super T>> T max(Collection<? extends T> coll);
  • Code that should be compiled, but can’t be compiled and vice versa
  • How to write good API using generics and wildcards
  • And other generic puzzlers