package com.day13.json;

import org.junit.Test;

import java.io.FileInputStream;
import java.util.*;

/**
 * Author: Json
 * Date: 2021/10/5
 **/
public class Json {
    public static void main(String[] args) throws Exception {
        System.out.println("开始咯");
        //Hashtable子类 Properties: 常用来处理配置文件 key和value都是String类型
        //创建Properties 配置文件 右键项目名称-> 创建一个Properties后缀的文件
        Properties properties =new Properties();
        //找到文件
        FileInputStream fileInputStream=new FileInputStream("jdbc.properties");
        //读取文件
        properties.load(fileInputStream);
       //获取文件里面数据
        String name=properties.getProperty("name");
        System.out.println(name);
    }

    @Test
    public void JsonTest(){
        //Collections 工具类
        List list =new ArrayList();
        list.add(123);
        list.add(122233);
        list.add(113223);
        list.add(1325123);
        list.add(13214423);
        list.add(1232112463);
        System.out.println(list);
         //reverse 反转
       // Collections.reverse(list);
      //  System.out.println(list);
        //随机排序 shuffle
//        Collections.shuffle(list);
//        System.out.println(list);
        //sort 升序排序
        Collections.sort(list);
        System.out.println(list);

        //等等 具体 使用 去查文档 


    }
}