See More

package problems; public class AddOne { public static void main(String[] args) { // Create integer to be used in solution function int problem = 5; // Print solution function System.out.println(solution(problem)); } // This function takes an integer and returns this integer incremented by one public static int solution(int n){ return n + 1; } }