Created
May 21, 2017 09:38
-
-
Save fermopili/3c2208adb0d60719778c714356be03fe to your computer and use it in GitHub Desktop.
com.javarush.task.task37.task3706
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.task.task37.task3706; | |
import java.util.Arrays; | |
import java.util.List; | |
/* | |
Давно забытый Array | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
List<Number> numbers = Arrays.<Number>asList(1, 2, 3); | |
addDataToList(numbers, getData()); | |
System.out.println(numbers); | |
} | |
public static Number[] getData() | |
{ Number[] numbers=new Integer[0]; | |
return numbers; | |
} | |
public static void addDataToList(List<Number> list, Number... data) { | |
for (Number number : data) { | |
list.add(number); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment