← Java Foundations

Week 5 — Methods

Apr 28 – May 2  ·  4 lessons  ·  Midterm at end of week

Objectives

  • Read any Java method header and name its five pieces
  • Apply the three-step call protocol (evaluate args → bind by position → jump) to predict output
  • State the pass-by-value rule for primitives and explain why "swap" doesn't swap
  • Choose between int, double, boolean, String, and void for a problem
  • Distinguish printing from returning, and prefer returning when the caller might use the value
  • Decide whether two headers form a legal overload pair or a duplicate-signature error
  • Decompose an English problem statement into 3–5 static-method calls from main