Skip to main content

Posts

Showing posts with the label Day 21: Generics Hackerrenk Solution Java

Day 21: Generics Hackerrenk Solution Java

 Day 21: Generics Hackerrenk Solution Java For Explanation Watch Video: Code: import  java.util.*; class  Printer <T> {      /**     *    Method Name: printArray     *    Print each element of the generic array on a new line. Do not return anything.     *    @param A generic array     **/      void  printArray(T arr[]){          for ( int  i= 0 ;i<arr.length;i++){             System.out.println(arr[i]);         }     }      // Write your code here } public   class ...