/
Vini1979
/
Java_OOP
Обзор
Документация
Войти
/
Vini1979
/
Java_OOP
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Lecture_04/Ex003/Methods.java
37 строк
837 B
Evgeny
Added L&S_04 and fixs
07 апр 2023, 22:23
07 апр 2023, 22:23
afdb3e7
Код
Авторство
О чём код?
package Ex003; import java.util.HashMap; import java.util.List; import java.util.Map; public class Methods { public static Integer getElementFromIntegerCollection(List<Integer> col, int index) { return col.get(index); } public static String getElementFromStringCollection(List<String> col, int index) { return col.get(index); } public static Double getElementFromDoubleCollection(List<Double> col, int index) { return col.get(index); } // #region public static <U> U getElementFromUCollection(List<U> col, int index) { return col.get(index); } // #endregion //#region public static <T1, T2> T2 put(T1 arg1, T2 arg2) { // Map<Integer,String> hm = new HashMap<>(); // hm.put(key, value) return arg2; } //#endregion }