METHOD INVOCATION – oops way | Techbirds

Method Invoked via Object . HI FOLKS, IT HAS BEEN NICE PRACTICE SO FAR TO CALL METHODS VIA SIMPLE MEANS . FIRST DEFINING IT AND THEN CALLING IT BY ITS SIGNATURE. BUT SINCE NOW A DAYS OOPS CONCEPT IS A HIT. METHOD CAN BE INVOKED VIA OBJECT. METHOD CLASS PROVIDES SUCH WAY TO CREATE A METHOD AND ITS SIGNATURE PARAMETERS TAKES AN OBJECT WITH INT.CLASS, CHAR.CLASS ETC. LIKE WE DO WITH THE POJOS OR CUSTOM CLASSES. IT WOULD BE GOOD IF ONE GET BORED OF DOING USUAL WAY AND WANTS TO HANDLE MOST OF THE MEMORY MANAGEMENT MANUALLY. WHEN WE CREATE A METHOD VIA FUNDAMENTAL WAY EVERY COMPILER DOES THIS WORK ON BEHALF OF US. IT USED THE CONCEPT OF INLINE METHODS ALTHOUGH I AM ASKED IN THE MIDDLE TO WRITE THIS BLOG. BUT ITS ENOUGH UNDERSTAND. LET ME PUT IN SIMPLE WORDS, EVERY METHOD DEFINED AND DECLARED OCCUPIES A PLACE IN THE MIND OF COMPILER AND WHEN WE CALL A METHOD IT CREATES ITS SPACE AND ATTACH IT TO THE ACTIVE PROCESS. AND IF METHOD DOES ITS PART IT GET DETACHED . THATS WHY WE CREATE METHODS WE INPUTS IT IT DYNAMICALLY CHANGES ADDRESS SPACE AND DO THE FUNCTIONING. BY MAKING METHOD VIA OBJECT INHERITS ALL THE OOPS CONCEPT TO A METHOD DEFINITION. IT HAS A LIFE AND SCOPE AND IT GET DESTROYED WHEN MAIN THREAD(IF TALKS ON ANDROID) IS INACTIVE HENCE SAVING SPACE AND OVERHEADS. WELL AT THIS PINT OF TIME I AM IN A PROCESS OF THINKING MORE ADVANTAGE OF DOING METHODS THIS WAY THAN TRADITIONAL. OPEN FOR DISCUSSION. CREATE METHOD OBJECT CREATE SPECIFICATION OBJECT CONTAINS INT.CLASS, CHAR.CLASS etc. INVOKE METHOD VIA METHOD_NAME.invoke(); THANKS,

YOUR OWN: TAPAN SAINI.

264 total views, 2 views today

Share this Onfacebook-3753320twitter-9962604linkedin-8189154google-6817250