i got it to run apple price at 100, 150 and 200 and neither of then complete the last requirement i dont get it. i added the lines in the solution to show how i did it
package en.codegym.task.jdk13.task04.task0402;
/*
Price of apples
*/
public class Solution {
public static void main(String[] args) {
Apple apple = new Apple();
apple.addPrice(50);
Apple apple2 = new Apple();
apple2.addPrice(100);
System.out.println("Apple price " + Apple.applePrice);
}
public static class Apple {
public static int applePrice = 0;
public static void addPrice(int applePrice) {
//write your code here
Apple.applePrice = applePrice;
}
}
}