How to Implement Method with Multiple Parameters in Java


In this example we will show the method to implement method with multiple parameters in Java.

Source Code

package com.beginner.examples;

public class MultipleMethod {
  static void test(String a, String b) { // method with multiple parameters
    System.out.println(a + " and " + b);
  }

  public static void main(String[] args) {
    test("a", "b");
  }
}

Output:

a and b
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments