Java SE 039 in-depth explanation of ArrayList

(1) As long as a person does not give up on himself, the whole world will not give up on you.
(2) I am born to be of great use . (3) If I
cannot bear the suffering of learning, I must bear the suffering of life. How painful it is Deep comprehension.
(4) You must gain from doing difficult things . (
5) Spirit is the real blade.
(6) Conquering opponents twice, the first time in the heart.
(7) Writing is really not easy. If you like it or have something for you Help remember to like + follow or favorite~

Java SE 039 in-depth explanation of ArrayList

public class ArrayListTest {
    
    
	public static void main(String[] args) {
    
    
		ArrayList a = new ArrayList();
		a.add("hello");
		a.add("world");
		a.add("welcome");
		
		String s1 = (String) a.get(0);
		String s2 = (String) a.get(1);
		String s3 = (String) a.get(2);
		
		System.out.println(s1);
		System.out.println(s2);
		System.out.println(s3);
	}
}

Guess you like

Origin blog.csdn.net/xiogjie_67/article/details/108501352