Make a public class Creater that provides a single class(static) method named subtractor. subtractor takes a single intargument and returns a method that implements the following Createinterface:
public interface Create {
int change(int something);
---------------------------------------------------------------------
The returned “function” should implement Create so that itsubtracts the value passed to subtractor. For example
Create one = Creater.substractor(5);
Create two = Creater.subtractor(-3);
System.out.println(one.change(5)); // should print 0
System.out.println(second.change(3); // should print -6
The answer should be is a single line lambdaexpression.
---------------------------------------------------------------------
Please continue what I have started:
public class Creater {
public static Create subtractor(int input) {
I’m not sure how to continue. Please write in simple java code,I'm a beginner student.