Top "Arraylist" questions

A simple collection data type found in some languages / platforms (such as in Java or .NET).

Check if a value exists in ArrayList

How can I check if a value that is written in scanner exists in an ArrayList? List<CurrentAccount> …

java arraylist contains
Print ArrayList

I have an ArrayList that contains Address objects. How do I print the values of this ArrayList, meaning I am …

java arrays printing arraylist
How to sort an ArrayList in Java

I have a class named Fruit. I am creating a list of this class and adding each fruit in the …

java sorting collections arraylist
Get specific ArrayList item

public static ArrayList mainList = someList; How can I get a specific item from this ArrayList? mainList[3]?

java arraylist
How to find the length of an array list?

I don't know how to find the length of an array list. I think you might need to use blank.…

java arraylist
How does a ArrayList's contains() method evaluate objects?

Say I create one object and add it to my ArrayList. If I then create another object with exactly the …

java object arraylist evaluation
Java: How to read a text file

I want to read a text file containing space separated values. Values are integers. How can I read it and …

java arraylist file-io text-files
Remove Item from ArrayList

I have an ArrayList suppose list, and it has 8 items A-H and now I want to delete 1,3,5 position Item stored …

java arraylist
How to declare an ArrayList with values?

ArrayList or List declaration in Java has questioned and answered how to declare an empty ArrayList but how do I …

java arraylist initialization declare
Initial size for the ArrayList

You can set the initial size for an ArrayList by doing ArrayList<Integer> arr=new ArrayList<Integer&…

java arraylist indexoutofboundsexception