• Saves Valuable Time
  • Trusted Accuracy for 14 Years
  • 15-Day Money-Back Guarantee

Java Equivalent to C# Arrays

Unsized Array

C# Java
int[] myArray = null; int[] myArray = null;   //no change

Sized Array

C# Java
int[] myArray = new int[2]; int[] myArray = new int[2];   //no change

Access Array Element

C# Java
x = myArray[0]; x = myArray[0];   //no change

Jagged Array

C# Java
int[][] myArray = new int[2][]; int[][] myArray = new int[2][];   //no change

Rectangular Array

C# Java
int[,] myArray = new int[2, 3]; int[][] myArray = new int[2][3];


Use C# to Java Converter to convert from C# to Java.     

Additional resource: Java and C# Equivalents


Copyright © 1997 – 2018 Tangible Software Solutions, Inc.