update at 2022-12-03 23:27:52 by ehlxr

This commit is contained in:
2022-12-03 23:27:52 +08:00
parent c1da2bd955
commit f251d5601a
2 changed files with 96 additions and 3 deletions

View File

@@ -24,6 +24,11 @@
package io.github.ehlxr;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author ehlxr
* @since 2022-01-17 06:31.
@@ -31,12 +36,15 @@ package io.github.ehlxr;
public class Main {
public static void main(String[] args) {
int[][] ns = {
{ 1, 2, 3, 4 },
{ 5, 6, 7, 8 },
{ 9, 10, 11, 12 }
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}
};
System.out.println(ns.length); // 3
System.out.println(ns[0].length); // 4
System.out.println(ns[2][2]); // 11
List<String> collect = Stream.of("111", "wwwdddd", "dddddd", "12").filter(x -> x.length() > 3).collect(Collectors.toList());
}
}