W jaki sposób mogę skrócić poniższy zapis kodu przy pomocy streama?
String []paths = getPaths();
File []files = new File[paths.length];
int i = 0;
for (String path: paths) {
files[i++] = new File(path);
}
W jaki sposób mogę skrócić poniższy zapis kodu przy pomocy streama?
String []paths = getPaths();
File []files = new File[paths.length];
int i = 0;
for (String path: paths) {
files[i++] = new File(path);
}