package com.youchain;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class testMain {
    @Test
    public static void main(String[] args) {
        /*List<Long> list=new ArrayList<>();
        list.add(1L);
        list.add(1L);
        list.add(1L);
        list.add(2L);
        list.add(3L);
        HashMap<Long, Integer> map = new HashMap<Long, Integer>();
        for(Long id:list){
            if (map.containsKey(id)) {
                map.put(id,map.get(id)+1);
            }else{
                map.put(id,1);
            }
        }

        for (Long key:map.keySet()){
            System.out.println("key= "+key+" and value= "+map.get(key));
        }*/

        /*for (int i = 1; i < 2; i++) {
            System.out.println(i);
            }

        int i = 1;
        do{
            System.out.println(i++);
        } while( i< 2 );

        for(int j=1;j<2;System.out.println(++j));

        for(int x=1;x++<2;System.out.println(x));*/

       /* int i = 1,j = 10;
        do {
            if(i>j){continue;}
            j--;
        }while(++i<6);System.out.println("¡="+i+" and j="+j);*/

       /* int a[]={4,2,-7,5,1,6,3};
        System.out.println(a[a[4]]);*/

        /*int m = 12, n = 34;
        System.out.print(m++);
        System.out.print(++n);
        System.out.print(n++);
        System.out.print(++m);*/

        /*String a = "a";
        String b = "b";
        String c = a + b;
        String d = new String("ab");
        System.out.println(c.equals(d));*/

       /* try {
            int i = 100 / 01;
            System.out.print(i);
        } catch (Exception e) {
            System.out.print(1);
            throw new RuntimeException();
        } finally {
            System.out.print(2);
        }


        System.out.print(3);*/

       /* String a="hello";
        String b="hello";
        System.out.println(a.equals(b));*/

/*        int one=0;
        int two=0;
        int three=0;
        for(int i=1;i<1001;i++){
            if(String.valueOf(i).contains("0")){
                one++;
            }
            if(String.valueOf(i).contains("00")){
                two++;
            }
            if(String.valueOf(i).contains("000")){
                three++;
            }

        }

        System.out.println(one+two+three);*/

    }

}
