Results 1 to 5 of 5
  1. #1
    rahil.khan is offline Member
    Join Date
    Oct 2014
    Location
    NEW DELHI
    Posts
    41
    Rep Power
    0

    Post array arguments...

    can we pass more than one array in a method?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: array arguments...

    What result did you get when you tried?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    rahil.khan is offline Member
    Join Date
    Oct 2014
    Location
    NEW DELHI
    Posts
    41
    Rep Power
    0

    Default Re: array arguments...

    class arr
    {
    public static void main(String args[])
    {
    int a=0;
    int foo(String m[], int p[])
    {
    return a;
    }
    t l= new t();
    }
    }

    this was my code... but its not compiling.....

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: array arguments...

    Have you read the compiler error and tried to understand it?

    And have you forgotten how to use the code tags?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: array arguments...

    Well when you start to grossly misuse the language like is done here, the compiler tends to be so confused it cannot give a clear indication what is wrong. The poor thing.

    This code declares a method (foo) within a static function (main). Don't do that.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. int arguments
    By batousai in forum New To Java
    Replies: 8
    Last Post: 01-09-2013, 03:06 PM
  2. vm arguments
    By mharsijamel in forum NetBeans
    Replies: 4
    Last Post: 01-02-2012, 12:40 PM
  3. help with arguments
    By smilinglady in forum New To Java
    Replies: 33
    Last Post: 01-27-2011, 03:10 AM
  4. Passing array arguments into main
    By JohnDas in forum New To Java
    Replies: 12
    Last Post: 11-10-2010, 03:00 PM
  5. Replies: 8
    Last Post: 09-23-2010, 12:07 AM

Posting Permissions

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