IT. Expert System.

Java basics

asList()


Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs, in combination with Collection.toArray(). The returned list is serializable and implements RandomAccess.

Syntax:
public static java.util.List asList(
    java.lang.Object[] arr);


Example:

// Arrays.asList example

import java.util.*;

public class MyClass
{
    public static void main()
    {
        // Declare an object array:
        Object[] myArr = { "Item1", "Item2", "Item3", "Four", "5" };

        // View the array as a list:
        List lst = Arrays.asList(myArr);

        // Display the list:
        System.out.print(lst);
    } 
}

/*
Output:
[Item1, Item2, Item3, Four, 5]
*/


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 379 / 158859427. Delta: 0.07505 с