Skip to content

Latest commit

 

History

History

Functions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

A block of code that performs a task

We can have a function that sends an email to someone, we can have a function that converts someone’s weight from pounds to kilos. We can have a function that validates user input, etc.

Function naming IS CAMEL CASE

Function architecture in Java #1. We always put the left brace within the same line where we define our function

Usage

ReturnType nameOfFunction() {

}

Function architecture in Java #2.

void sendEmail() {

}

Every Java program should have at least one function and this function is called main.