Tangible Software Solutions

The Most Trusted Name in Source Code Conversion

  • Trusted for over 12 Years
  • Saves Valuable Time
  • Accurate and Reliable
  • Responsive Support

Java Equivalent to C# List

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

Original C#:

void Lists()
   List<int> myList = new List<int>();
   myList.Insert(1, 2);
   int i = 1;
   myList[0] = i;
   i = myList[0];

Equivalent Java:

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);

If you need to convert from C# to Java and you are depending on the results being reliable and accurate, then you will want to have C# to Java Converter, the best C# to Java converter, at your fingertips.

Copyright © 1997 - 2017 Tangible Software Solutions Inc.