Best practice to pass arguments
<p>Assume I have an Application class with about 10 fields. In Some other utility class I have one of the two methods below. Out of these two which is the best to use?
Is it better to pass in the whole application object, or pass in only which is needed for the utility method? Please explain why.</p>

<pre><code>public printUsernameAndGroup(String username, String group){
    sout(username);
    sout(group);
}

public printUsernameAndGroup(Application application){
    sout(application.username);
    sout(application.group);
}
</code></pre>