• Saves Valuable Time
  • Trusted Accuracy since 2004
  • 15-Day Money-Back Guarantee

Java Equivalent to VB List

The nearly exact Java equivalent to the .NET List collection is the ArrayList collection.

VB Java
Imports System.Collections.Generic

Sub Lists()
    Dim myList As New List(Of Integer)()
    myList.Insert(1, 2)
    Dim i As Integer = 1
    myList(0) = i
    i = myList(0)
End Sub
void Lists()
    java.util.ArrayList<Integer> myList = new java.util.ArrayList<Integer>();
    myList.add(1, 2);
    int i = 1;
    myList.set(0, i);
    i = myList.get(0);

Use VB to Java Converter to convert from VB to Java.     

Additional resource: VB.NET and Java Equivalents

Copyright © 2004 – 2021 Tangible Software Solutions, Inc.