Advertisement
Georgi_Benchev

Untitled

Oct 25th, 2024
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. package JAVA_ADVANCED.lec_17_Generics.Task2_ArrayCreater;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.  
  6.  
  7.  
  8.         String[] stringArray =  ArrayCreator.create(String.class,5, "House");
  9.         Integer[] intArray = ArrayCreator.create(5,10);
  10.         for (String el:stringArray){
  11.             System.out.println(el);
  12.         }
  13.         for (Integer el:intArray){
  14.             System.out.println(el);
  15.         }
  16.  
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement