method parameters java

Solutions on MaxInterview for method parameters java by the best coders in the world

showing results for - "method parameters java"
Filippo
11 Mar 2019
1public class Main {
2  static int myMethod(int x) {
3    return 5 + x;
4  }
5
6  public static void main(String[] args) {
7    System.out.println(myMethod(3));
8  }
9}
10// Outputs 8 (5 + 3)
11 
12
Mario
12 Oct 2016
1public static void hello (String hey, String wassup) 
2//the paramter in this case is located in the parenthesis