returning arrays or vectors


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: returning arrays or vectors

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    13

    returning arrays or vectors

    Hi,
    My code has a method that reurns an array as below:

    public static String[ ] method_name(argument list)
    {
    statements....

    return array;
    }

    When I try to print the array elements there is nothing that gets printed. But when I print the array elements in the method I am able to print them. What is the problem? why does the array has no elements in the main method?

    I am accessing this method in main as below:

    array_main = method_name(parameters);

    Somebody please help...

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Could you post your code for the method?

    How have your declared the array which is being "constructed" by the returned array?

  3. #3
    Join Date
    Feb 2006
    Posts
    13
    Thanks for your response, I got it working... what I did was just make some variables global.

Similar Threads

  1. Returning Object Arrays
    By Nai in forum VB Classic
    Replies: 2
    Last Post: 01-03-2006, 06:10 PM
  2. Replies: 15
    Last Post: 05-09-2001, 05:40 AM
  3. Returning arrays from object?
    By Mike in forum ASP.NET
    Replies: 0
    Last Post: 07-07-2000, 06:39 AM
  4. returning arrays to VB from c dll
    By john in forum VB Classic
    Replies: 0
    Last Post: 07-03-2000, 12:03 PM
  5. returning arrays to VB from c dll
    By john in forum VB Classic
    Replies: 0
    Last Post: 07-03-2000, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center