视频教程
https://www.bilibili.com/video/av63831182?from=search&seid=8554691791196685337
package com.itcast;/**
* @author n00444323
* @date 2019/6/5 17:14
*/
import org.springframework.jndi.JndiObjectTargetSource;
import org.springframework.util.StringUtils;
import org.springframework.util.SystemPropertyUtils;
import java.util.HashMap;
import java.util.Map;
/**
* @param
* @return
* @throws
*/
public class HashMapTest {
public static void main(String[] args) {
String[] array = new String[10];
array[0] = "000";
array[1] = "111";
array[2] = "222";
array[1] = "333";
//这里会覆盖
System.out.println(array[1]); //333
//我想存储对象怎么办
Student[] students = new Student[10];
students[0] = new Student("张三", "19", "男");
students[1] = new Student("李四", "20", "男");
for (int i = 0; i < students.length; i++) {
Student student = students[i];
System.out.println(student);
}
//其实hashMap的本质是数组和链表,存储结构如图所示
Map map = new HashMap();
map.put("aaa", "111");
map.put("bbb", "222");
map.put("ccc", "333");
map.put("ddd", "444");
}
}