HttpEntity<?> requestEntity = new HttpEntity<Object>(json, headers);
I have a couple of questions here?
- What does the
?mean here. Why have they put<?>instead of<Object> - Why does the HTTPEntity Constructor take <
Object> as its type but the Class Reference taking <?> as its type.
?— wildcard syntaxRemember that if you try to add Object into requestEntity you’d get a compiler error.
read about generics here