Java: Method parameters or arguments

This entry is part 17 of 54 in the series Learn Java

The parentheses that follow the method name are used to pass arguments to the method.

A method can be defined to take any number of arguments and they can have any data types, just ensure the method is called with the same types and number of arguments.

package javaapplication17;

public class JavaApplication17 {

    static class MyApp {

        void PrintOut(String s) {

    public static void main(String[] args) {
        MyApp m = new MyApp();


Series Navigation<< Java: Calling methods
Java: Return statement >>