public static void main(String[] args) {
		List<User> uList=new ArrayList<User>();
		uList.add(new User(1, "xxx", 1, 18));
		uList.add(new User(2, "zzz", 1, 19));
		uList.add(new User(3, "aaa", 1, 20));
		uList.add(new User(4, "bbb", 1, 21));
		//最大年龄
		Integer maxAge=uList.stream().mapToInt(User::getAge).max().getAsInt();
		System.out.println("最大年龄为:"+maxAge);
		//最小年龄
		Integer minAge=uList.stream().mapToInt(User::getAge).min().getAsInt();
		System.out.println("最小年龄为:"+minAge);
		//年龄和
		Integer sumAge=uList.stream().mapToInt(User::getAge).sum();
		System.out.println("年龄和为:"+sumAge);
		//年龄平均值
		double avgAge=uList.stream().mapToDouble(User::getAge).average().getAsDouble();
		System.out.println("年龄平均值为:"+avgAge);
		double[] d={110.12,12.3,110.23,78.9};
		double minDouble=Arrays.stream(d).min().getAsDouble();
		System.out.println("最小数组值:"+minDouble);
                            
java连接外网的redis java项目连接redis

认识jedisjedis 是redis官方推荐的的Java连接redis工具【jedis命令和redis命令一致】依赖<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId>

readnumber函数JAVA javaread()

public class RandomAccessDemo6 { public static void main(String[] args) throws IOException { RandomAccessFile src = new RandomAccessFile("src.AVI", "r"); RandomAccessFi