Created
December 18, 2016 03:30
-
-
Save shah-smit/6a2b1fc187fca027cfe309a7926588be to your computer and use it in GitHub Desktop.
Generic Array Print
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Printer | |
{ | |
//Write your code here | |
<T> void printArray(T[] anyType) | |
{ | |
for(int i = 0; i<anyType.length; i++) | |
{ | |
System.out.println(anyType[i]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment