Q:

Pass all parameters of a function

I have a function that receives a number of parameters.
To make my code look clearer and better to maintain, I'd like to outsource some part of the function to another function in the same class.
This new function requires the same parameters as the original function.
Is there a way to pass all parameters of this function at once (in the same order of course) instead of having to write them all explicitely?

A:

If you have more than 3 or 4 parameters, I'd encapsulate them in an object and pass that along instead of the parameters themselves.
So, instead of 
void someMethod(String name, int age, double salary, char gender);

I'd use
void someMethod(person);

with person being something like this (you get the idea)
class Person {
    String name;
    int age;
    double salary;
    char gender;
}

