Java – Functions
Functions are reusable blocks of code that perform specific tasks. They are defined using the public static void syntax.
Example:
public static void greet() {
System.out.println("Hello, World!");
}
public static void main(String[] args) {
greet();
}
No images available.