Skip to content

Instantly share code, notes, and snippets.

@shah-smit
Created December 18, 2016 03:30
Show Gist options
  • Save shah-smit/6a2b1fc187fca027cfe309a7926588be to your computer and use it in GitHub Desktop.
Save shah-smit/6a2b1fc187fca027cfe309a7926588be to your computer and use it in GitHub Desktop.
Generic Array Print
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