Answers for "how to empty a list in java"

2

empty array java

//where n is the length you want the array to be
// for integer array
int[] intArray = new int[n];
// for String array
String[] strArray = new String[n];
Posted by: Guest on November-04-2020
1

java empty array

String [] names = new String[0];

// or 

int [] ages = {}
Posted by: Guest on June-18-2020
0

how to empty list in java

arr.clear();
Posted by: Guest on August-18-2021
-2

java create new empty list

List myList = new ArrayList();
Posted by: Guest on April-29-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language