Skip to content

ArrayList: a list that grows · ⁨ArrayList:可以增长的列表⁩

English

A list that can grow

  • An array has a fixed size. Once you make it, the length cannot change.
  • An ArrayList is a list that can grow and shrink while the program runs.
  • You must import it at the top of the file: import java.util.ArrayList;.
中文

一个可以增长的列表

  • 数组(array)的大小是固定的。一旦创建,长度就不能改变。
  • ArrayList 是一种列表,它在程序运行时可以增长和缩小。
  • 你必须在文件顶部导入(import)它:import java.util.ArrayList;。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩