Slide 1How do Methods Work? Slide 2 Let’s write a method that adds two integer values together and returns the result. Slide 3 static int add(int n1, int n2) { int sum…