Answer:
public static int greaterThanInt(int n) {
return n + 10;
}
Explanation:
This Java method is quite straightforward. It takes an integer n as an argument and will return n+10 because the requirement is to provide an integer that exceeds n; adding any integer to n will fulfill that condition.
A complete Java program that calls this method is presented below:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please enter an integer");
int n = in.nextInt();
int greaterInt = greaterThanInt(n);
System.out.println("You entered " + n + ", " + greaterInt + " is larger than it");
}
public static int greaterThanInt(int n) {
return n + 10;
}
}