Quantcast
Channel: Java equivalent of Python List - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by Nick for Java equivalent of Python List

The closest Java has to a Python List is the ArrayList<> and can be declared as such //Declaring an ArrayListArrayList<String> stringArrayList = new ArrayList<String>();//add to the...

View Article



Answer by Guru for Java equivalent of Python List

Take a look at Collections in java. There are many lists (ArrayList, LinkedList etc). Choose the best datastructure needed for the requirement and complexity (both space and time).

View Article

Answer by Parker for Java equivalent of Python List

Java has an interface called list, which has implementations such as ArrayList, AbstractList, AttributeList, etc.https://docs.oracle.com/javase/8/docs/api/java/util/List.htmlHowever, each one has...

View Article

Answer by user9352456 for Java equivalent of Python List

Several collections exist, but your probably looking for ArrayListIn Python you can simply declare a list like so:myList = []and begin using it.In Java, it better to declare from the interface first...

View Article

Java equivalent of Python List

In Python there is a data structure called 'List'. By using 'List' data structure in Python we can append, extend, insert, remove, pop, index, count, sort, reverse.Is there any similar data structure...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images