tags:

views:

47

answers:

2

Hi , Generally we need to modularize our design.ie., we have to breakup our application logic into set of small functions.And then integrate these functions to achieve our ultimate functionality.But from the language(java) perspective ,invoking a method involves more stack operations(push and pop the method address from stack).How to compromise this modularization.

I have another question . How method calls are internally implemented in a JVM ?

+1  A: 

What other alternative do you have? Duplicate the code?
Honestly your first question is not very clear.
And if you asking the second question then probably Java is not the language for your task.

Mykola Golubyev
+1  A: 

Since Premature optimization is the root of all evil I'd go for modularized desing. If it's really important you can later optimize your code. You should search for inline methods for instance.

asalamon74