User-Defined Methods - ICSE Class 10 Computer Applications Notes, Diagrams and Solved Questions

Why we write methods, the parts of a method header, return, actual and formal parameters, call by value and by reference, pure and impure, static and non-static methods, and method overloading.

In this chapter

  • The parts of a method header, the prototype and the signature
  • Calling a method and the return statement, with a step-through of the jump
  • Actual and formal parameters; call by value vs call by reference
  • Pure (accessor) and impure (mutator) methods
  • Static vs non-static methods, and the "static context" error
  • Method overloading, with an explorer showing which version Java picks
  • Building exam programs from small methods: primes, Armstrong, GCD, series