« first day (4485 days earlier)      last day (462 days later) » 

12:00 AM
Elliptic paraboloids for sale. (source)
 
 
1 hour later…
1:12 AM
Why doesn't it cause compilation errors? Integer and String are different types. And if it doesn't matter, why do things like <T, R> exist (if you can just type <T>, one letter can stand for any number of different types, apparently)?
 
1:47 AM
Why is that so?
Ok, I got it. The question on generics still stands, though
 
 
1 hour later…
3:13 AM
If I create a class, does it automatically extend Object?
 
 
6 hours later…
9:29 AM
@SergeyZolotarev yes
 
9:56 AM
@SergeyZolotarev one isnt sufficient for both, but both can be of the same type
both an Integer[] and a String[] can be treated as an Object[]
so, invoking it as <Object>print(oddArray, sa) is considered fine
the compiler will resolve it to be some weird type, of which I dont even thing Java has sufficient syntax to allow you to define it explicitly
 
 
2 hours later…
11:48 AM
How do you pull off that whole lambda thing when parameters are involved?
@Wietlol I don't think I understood your response. Again, why may you need <T, R> and such if everything is an Object and one letter will do, as in my example?
 
12:04 PM
@SergeyZolotarev because it wont always be the case
 
1:04 PM
I figured it out with lambdas, btw
@Wietlol what do you mean? Isn't everything an Object instance?
 
1:50 PM
you sometimes care about different types
and sometimes have different constraints
 

« first day (4485 days earlier)      last day (462 days later) »