1 parent 547916d commit 4b61897Copy full SHA for 4b61897
1 file changed
QUESTIONS.md
@@ -604,4 +604,24 @@
604
String pick2 = pick("a", new String());
605
// intellij is still showing the type parameter as Serializable
606
CharSequence pick3 = pick("a", new RandomList<Integer>());
607
- ```
+ ```
608
+
609
+38. generic constructors ?
610
+ also type inference left me confused.
611
+ what algo. does java use for type inference ?
612
+ is scala magic preferable or is there a better explanation
613
+ maybe read it again
614
615
+ https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html
616
617
+ how to use ?
618
619
+ ```java
620
+ class MyClass<X> {
621
+ <T> MyClass(T t) {
622
+ // ...
623
+ }
624
625
626
627
+ and what would be an actual example ?
0 commit comments