For example, int []a={1,2,3,4,5,5}; ->?->int []a={1,2,4,5,5}; to make it a The third value is Is there a way to erase it? In that case, the size of the array can be assigned dynamically or I wonder if I need to reset the array itself.
java
An array is a static data space. It's fixed. And unlike languages like c/c++, it's created in Heap, which is a gc target. I could use the stack enough.
Because it's fixed, of course it doesn't have this dynamic property. In that case, you can use ArrayList.
© 2024 OneMinuteCode. All rights reserved.