Search:

Type: Posts; User: FongChengWeng

Search: Search took 0.15 seconds.

  1. [SOLVED] Re: How to declare an object of multi-dimension array?

    YES!!It's works!!
    But there is an error inside the Add function. It should be getNumRows() rather than getRow() if I'm not mistaken and the ensureCapacity() function will cause an error if it's...
  2. [SOLVED] Re: How to declare an object of multi-dimension array?

    After I created the ArrayList2d (list), why list.Add("String", 0) (function in the ArrayList2d class) cause an error.(Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0...
  3. [SOLVED] Re: How to declare an object of multi-dimension array?

    copeg, javapenguin, thanks for help and suggenstion!!
    Can I ask, can we use 2d ArrayList to create N x N matrix?
  4. [SOLVED] How to declare an object of multi-dimension array?

    <the code show below was copied from this forum>

    import java.util.ArrayList;

    public class ArrayList2d<Type>
    {
    ArrayList<ArrayList<Type>> array;

    public ArrayList2d()
    {
Results 1 to 4 of 4