In this example we will show the method to implement method with parameters in Java.
Source Code
package com.beginner.examples;
public class Method {
static void test(int a) { // method with parameters
System.out.println(a);
}
public static void main(String[] args) {
test(1);
}
}
Output:
1