In Java, when I get a ResultSet
I made a method that would map that to a specified class. It more or less looks like this:
public <T> T mapRow(ResultSet results, Class<T> type) {
So, when I actually call the class, it looks like this:
mapRow(results, Row.class);
Please help me understand this conceptually.
- Why can I not just do something like
mapRow<Row>(results);
? - Also, the current way I'm invoking
mapRow
, is there an implied<Row>
before the method call?