What is the time taken by java to call a method in another package?
<p>I have an assignment where i need to do feasibility study on two of my approaches and find optimized one.</p>

<p>There are two packages A and B
User input is gathered in A and then sent to B for execution.
Now my approaches are
1. Call B methods from package A one by one.
2. Create a common method in B and send all the input as parameters.</p>

<p>Which is feasible and best one, I know 2 is good in terms of code optimization and less number of calls.
But, I want to understand what will be the execution time difference in above approaches
How much time does java take to call method in another package? Is there any default value like x nano seconds or y milli seconds.</p>

<p>Based on the time taken I can choose the appropiate one.</p>

<p>Thanks</p>
