in reply to getting count of method params

Parameters to Java methods are usually enclosed between brackets and seperated by commas, right?

So how about extracting the part between the brackets and spliting that part at the comma? The number of elements in the list returned by split should tell you how many arguments a given method could take.

Cheers, Flo

Replies are listed 'Best First'.
Re^2: getting count of method params
by neeha (Novice) on Mar 14, 2006 at 12:01 UTC
    I was doing it that way only.But my code looks quite lengthy.Is there any regular expressions by which i can achieve it.I am not that experienced in Perl so wanted to know if we can achive it in a short way.