| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Java Lessons - Methods

Page history last edited by Steve Sweeney 7 years, 11 months ago

Java Lessons - Methods

(also called Subprograms, Subroutines, Procedures, Functions)

 

Topic & Key Concepts
Lesson
Notes
Videos
Exercises

Predefined Methods

  • System class for output
  • In class for input
    VT: Predefined Methods
 

Predefined Methods

  • Math class for calculations
    VT: Predefined Methods
 

Method Basics

  • defining a custom method
  • modular programming & code reuse
  • testing methods
    VT: Creating Simple Methods
 

Passing Parameters to Methods

  • changes in method definition
  • parameter vs variable names
  • increasing method utility
    VT: Passing Parameters
 

Returning Values from Methods

  • meaning of "void" keyword
  • commands vs queries
  • descriptive naming of methods
    VT: Return Values from Methods
 

Boolean Methods

  • descriptive naming of methods
  • methods as conditions
    VT: Boolean Methods
 

Method Overloading

  • multiple methods with same name
  • advantages, limitations, warnings
    VT: Method Overloading
 

Scope & Accessibility

  • limits on variable use
  • global vs local variables
       

Program Design using Methods

  • "top down" design
  • method "stubs"
       

Program Design using Methods

  • "bottom up" design
  • testing methods
       

 

 

 

Methods in Java
     
Java - Intro to Methods Note - Methods

VT: Introduction to Methods

Sample Code - Creating a Method

[Exercises - Subroutines without Parameters]

Java Methods - Parameters

(procedures)

Note - Parameter Passing with Methods

VT: Passing Parameters to a Method

Sample Code - Method Parameters

[Exercises - Subroutines with Parameters]

Java Methods - Return Values

(functions)

Note - Return Values

VT: Return Values from Methods

Sample Code - Return Values

[Exercises - Functions]
Java - Random Number Method Note - Random Numbers   random value exercises
Method Overloading Note: Method Overloading    
Review Methods (ICS3U to ICS4U)      
Methods with Arrays Presentation: Arrays in Methods VT - Arrays in Methods  

 

Comments (0)

You don't have permission to comment on this page.