CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 1999
    Location
    usa
    Posts
    33

    how to check if an array is null ?

    String cols[][][] = new String[7][2][]; int colcount[] = new int[7];
    int i=0;
    while (rs.next()) {
    cols[0][0][i] = rs.getString(1);
    cols[0][1][i] = rs.getString(2);
    colcount[0] += rs.getInt(2);
    i++;
    } // end while

    how do i check if the value in
    cols[0][1][4] is null ?

    maybe , but not likely :-

    if (cols[0][1][4] is null) ?

    thanks

    http://members.xoom.com/lookads

  2. #2
    Join Date
    Oct 1999
    Posts
    6

    Re: how to check if an array is null ?

    Here s[] is a single dimesion array : Similarly u can use null to compare wheather an array is null
    for(int i=0;i<15;i++){
    if(s[i]==null)
    System.out.println ("Null");
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured