Chitta Ranjan Mahato wrote:You can not call a method within a method
I think you mean that you can not
declare a method directly* within another method. It's certainly possible to
call another method though. This is probably just a linguistic misunderstanding, but I think it's important to correct in this case.
declaring a method != calling a method
* It's possible to declare an inner class within a method, and then declare another method within that inner class. But that's a more advanced topic, and not what the original poster was doing.
I see David has already posted as much while I was dealing with posting problems. Oh well - I hope the added detail here may help some.