Home » list

Tag Archives: list

List in Python

In this article, we will explain List in Python through examples. 1. Introduction Lists are used to store multiple items in a single variable. List items are indexed, the first item has index [0], the second item has index [1], etc. Also, a list is ordered, which means that the items have a defined order, and changeable, meaning that we ...

Read More »

Java List methods Tutorial

In this article, we will learn about the Java List methods. List is an ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list. This interface ...

Read More »

Java 8 Convert an Array to List Example

Hello readers, in this tutorial, we will learn to convert the primitive array to list using the Java8 Stream API. 1. Introduction Converting an Array of data into an equivalent List does seem like one of the simplest tasks which a programmer would do when coding in Java. There are many scenarios where the data is present in an Array, ...

Read More »

Groovy List Example

Table Of Contents 1. Introduction 2. List Declaration 3. Add Items 4. Remove Items 5. Item Lookup 6. Split List 7. Count 8. Apply 9. Conclusion 1. Introduction List is generally used as stack in software development world in order to push items in it for future use and to be able to fetch back in a desired way. In ...

Read More »

Sorted List Java Example

In this article, we will create a Java example on Sorted List. I will show how to sort a java.util.List using methods of java.util.Collections class. 1. SimpleSortExample Create a Java class called SimpleSortExample with the following source code. SimpleSortExample.java 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 ...

Read More »