Лабораторная работа №3 (готово)

This commit is contained in:
DjonniStorm 2024-06-03 17:56:03 +04:00
parent a01878caef
commit a2a1b3355c

View File

@ -13,7 +13,7 @@ import java.util.Random;
public class AdditionalCollection <T extends EntityTruck, U extends IDrawningWheels>{
public T[] _collectionEntity;
public U[] _collectionWheels;
public AdditionalCollection(int value, Class<T> type1, Class<T> type2) {
public AdditionalCollection(int value, Class<T> type1, Class<U> type2) {
_collectionEntity = (T[]) Array.newInstance(type1, value);
_collectionWheels = (U[]) Array.newInstance(type2, value);
}