We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 21: Generics
Day 21: Generics
Sort by
recency
|
353 Discussions
|
Please Login in order to post a comment
cpp
One should take the input in this way
int n; cin >> n; vector intVector(n); for (int i = 0; i < n; i++) { cin >> intVector[i]; }
Typescript
public void printArray(T[] list){ for(T type: list){ System.out.println(type); }
in TS